Bug 228764 - devel/godot: fails to build on multiple bundled vs. system library conflicts
Summary: devel/godot: fails to build on multiple bundled vs. system library conflicts
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-05 14:21 UTC by Dmitry Marakasov
Modified: 2018-06-23 21:18 UTC (History)
1 user (show)

See Also:
FreeBSD: maintainer-feedback+


Attachments
maintainer update devel/godot (5.18 KB, patch)
2018-06-13 08:25 UTC, Shane
FreeBSD: maintainer-approval+
Details | Diff
maintainer update devel/godot2 (4.29 KB, patch)
2018-06-13 08:26 UTC, Shane
FreeBSD: maintainer-approval+
Details | Diff
maintainer update for devel/godot (7.60 KB, patch)
2018-06-17 04:56 UTC, Shane
FreeBSD: maintainer-approval+
Details | Diff
maintainer update for devel/godot (7.98 KB, patch)
2018-06-22 04:56 UTC, Shane
FreeBSD: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov freebsd_committer 2018-06-05 14:21:58 UTC
There are multiple conflicts between bundled dependencies and systemwide installed libraries which lead to build errors. For now, I've run into:

- enet:

modules/enet/networked_multiplayer_enet.cpp:65:11: error: no member named 'wildcard' in '_ENetAddress'
                address.wildcard = 1;
                ~~~~~~~ ^
modules/enet/networked_multiplayer_enet.cpp:67:3: error: use of undeclared identifier 'enet_address_set_ip'; did you mean 'enet_address_get_host'?
                enet_address_set_ip(&address, bind_ip.get_ipv6(), 16);
                ^~~~~~~~~~~~~~~~~~~
                enet_address_get_host
/usr/local/include/enet/enet.h:536:14: note: 'enet_address_get_host' declared here

- zstd:

[Initial build] clang -o thirdparty/zstd/compress/zstd_compress.x11.opt.64.llvm.o -c -O2 -pipe -march=nocona -fstack-protector -fno-strict-aliasing -g1 -O3 -ffast-math -O2 -march=nocona -fstack-protector -fno-strict-aliasing -DRTAUDIO_ENABLED -pipe -pthread -Ithirdparty/rtaudio -w -DNDEBUG -DZSTD_STATIC_LINKING_ONLY -DFREETYPE_ENABLED -DRECAST_ENABLED -DSVG_ENABLED -DTYPED_METHOD_BIND -DTOUCH_ENABLED -DOSS_ENABLED -DX11_ENABLED -DUNIX_ENABLED -DOPENGL_ENABLED -DGLES_ENABLED -DGLES_OVER_GL -DPTRCALL_ENABLED -DGDSCRIPT_ENABLED -DMINIZIP_ENABLED -DXML_ENABLED -DGLAD_ENABLED -DGLES_OVER_GL -D_THREAD_SAFE -Icore -Icore/math -Ieditor -Idrivers -I. -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -Iplatform/x11 -Ithirdparty/zstd -Ithirdparty/zstd/common -Ithirdparty/rtaudio -Ithirdparty/glad -Ithirdparty/recastnavigation/Recast -Ithirdparty/recastnavigation/Recast/Include -Ithirdparty/nanosvg thirdparty/zstd/compress/zstd_compress.c

In file included from thirdparty/zstd/compress/zstd_compress.c:29:
thirdparty/zstd/compress/zstd_compress_internal.h:46:5: error: unknown type name 'ZSTD_dictMode_e'
    ZSTD_dictMode_e dictMode;
    ^
thirdparty/zstd/compress/zstd_compress_internal.h:449:37: error: unknown type name 'ZSTD_dictMode_e'
                                    ZSTD_dictMode_e dictMode,
                                    ^
thirdparty/zstd/compress/zstd_compress.c:215:8: error: conflicting types for 'ZSTD_initCCtxParams'
size_t ZSTD_initCCtxParams(ZSTD_CCtx_params* cctxParams, int compressionLevel) {
       ^
thirdparty/zstd/compress/zstd_compress.c:212:12: note: previous implicit declaration is here
    return ZSTD_initCCtxParams(params, ZSTD_CLEVEL_DEFAULT);
           ^
thirdparty/zstd/compress/zstd_compress.c:283:10: error: use of undeclared identifier 'ZSTD_p_nbThreads'; did you mean 'ZSTD_p_nbWorkers'?
    case ZSTD_p_nbThreads:
         ^~~~~~~~~~~~~~~~
         ZSTD_p_nbWorkers
/usr/local/include/zstd.h:1031:5: note: 'ZSTD_p_nbWorkers' declared here
    ZSTD_p_nbWorkers=400,    /* Select how many threads will be spawned to compress in parallel.
    ^

These are likely caused by incorrect include path order, e.g. system path preceeds local one and (some) headers from /usr/local/include are included instead of local ones.

The solution should be either fixing the include order (or using -isystem instead of -I for external include paths), or switching to external depends (which is a  good practice in general).

PS. Also I've enabled verbose build as required by PHB.
Comment 1 Shane 2018-06-13 08:25:12 UTC
Created attachment 194215 [details]
maintainer update devel/godot

Prepend internal search paths so that internal patched sources are found before system installed libs.
Adjust openssl flags so that port installed libs can be used.
Re-order Makefile to satisfy portlint ordering.
Comment 2 Shane 2018-06-13 08:26:13 UTC
Created attachment 194216 [details]
maintainer update devel/godot2

matching changes for devel/godot2
Comment 3 Shane 2018-06-17 04:56:11 UTC
Created attachment 194317 [details]
maintainer update for devel/godot

Replace devel/godot adjustment with update to 3.0.3

This update removes two patch files -
patch-drivers_unix_os__unix.cpp
patch-scene_gui_rich__text__label.cpp
Comment 4 Shane 2018-06-22 04:56:07 UTC
Created attachment 194474 [details]
maintainer update for devel/godot

update patch to include BROKEN from ports r473009
Comment 5 commit-hook freebsd_committer 2018-06-23 21:18:34 UTC
A commit references this bug:

Author: amdmi3
Date: Sat Jun 23 21:18:21 UTC 2018
New revision: 473165
URL: https://svnweb.freebsd.org/changeset/ports/473165

Log:
  - Update to 3.0.3
  - Fix conflicts for some system libraries due to incorrect include path order
  - Pet portlint
  - Fix openssl detection

  PR:		228764
  Submitted by:	FreeBSD@ShaneWare.Biz (maintainer)

Changes:
  head/devel/godot/Makefile
  head/devel/godot/distinfo
  head/devel/godot/files/patch-drivers_unix_os__unix.cpp
  head/devel/godot/files/patch-modules_enet_SCsub
  head/devel/godot/files/patch-modules_squish_SCsub
  head/devel/godot/files/patch-platform_x11_detect.py
  head/devel/godot/files/patch-scene_gui_rich__text__label.cpp
  head/devel/godot/files/patch-thirdparty_zstd_SCsub
Comment 6 commit-hook freebsd_committer 2018-06-23 21:18:36 UTC
A commit references this bug:

Author: amdmi3
Date: Sat Jun 23 21:18:27 UTC 2018
New revision: 473166
URL: https://svnweb.freebsd.org/changeset/ports/473166

Log:
  - Fix conflicts for some system libraries due to incorrect include path order
  - Pet portlint
  - Fix openssl detection

  PR:		228764
  Submitted by:	FreeBSD@ShaneWare.Biz (maintainer)

Changes:
  head/devel/godot2/Makefile
  head/devel/godot2/files/patch-modules_squish_SCsub
  head/devel/godot2/files/patch-platform_x11_detect.py