Summary: | graphics/blender: fails to link with CYCLES | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Charlie Li <vishwin> | ||||
Component: | Individual Port(s) | Assignee: | Steve Wills <swills> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | FreeBSD, emaste | ||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(FreeBSD) |
||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 214864 | ||||||
Attachments: |
|
Description
Charlie Li
2018-05-27 04:48:57 UTC
Does it work if you set LLD_UNSAFE=yes in the port's Makefile? (In reply to Ed Maste from comment #1) bfd fails with the same error: lib/libcycles_util.a(util_logging.cpp.o): In function `ccl::util_logging_init(char const*)': util_logging.cpp:(.text+0x59): undefined reference to `gflags::SetCommandLineOption(char const*, char const*)' util_logging.cpp:(.text+0x88): undefined reference to `gflags::SetCommandLineOption(char const*, char const*)' util_logging.cpp:(.text+0xae): undefined reference to `gflags::SetCommandLineOption(char const*, char const*)' util_logging.cpp:(.text+0xd1): undefined reference to `gflags::SetCommandLineOption(char const*, char const*)' lib/libcycles_util.a(util_logging.cpp.o): In function `ccl::util_logging_start()': util_logging.cpp:(.text+0x11b): undefined reference to `gflags::SetCommandLineOption(char const*, char const*)' lib/libcycles_util.a(util_logging.cpp.o):util_logging.cpp:(.text+0x141): more undefined references to `gflags::SetCommandLineOption(char const*, char const*)' follow c++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. Created attachment 193808 [details]
build fix workaround for graphics/blender
Adding LLD_UNSAFE=yes does not fix this. The quick workaround is to add WITH_CYCLES_LOGGING to CMAKE_OFF. When enabled this allows blender to be started with extra debugging output while rendering, unless gathering info for a bug report disabling this makes no difference to the user.
For a proper fix I'm not sure why this is happening. The conflict only happens if devel/gflags is installed when building blender, which includes its own copy of gflags source in extern/gflags.
devel/gflags is now being installed via graphics/opencv.
Both the port installed and blender included files have
SetCommandLineOption(const char* name, const char* value)
but lld is giving an error looking for
gflags::SetCommandLineOption(char const*, char const*)
Both sources use "const char*" but lld is looking for "char const*" - but only when gflags is installed from ports.
Matching code to use SetCommandLineOption is also used in blenders intern/libmv which doesn't get this error - libmv logging is always enabled and builds if CYCLES_LOGGING is disabled per the patch.
The two blender sources using SetCommandLineOption are
intern/libmv/intern/logging.cc -- this builds
intern/cycles/util/util_logging.cpp -- this fails if gflags port is installed
Just to clarify - this is NOT an LLD issue. On 11-stable using gnu ld the same error appears - when the gflags port is installed. (In reply to Shane from comment #4) Thanks for investigating/updating. A commit references this bug: Author: swills Date: Fri Jun 15 18:58:41 UTC 2018 New revision: 472484 URL: https://svnweb.freebsd.org/changeset/ports/472484 Log: graphics/blender: fails to link with CYCLES PR: 228531 Submitted by: Shane <FreeBSD@ShaneWare.Biz> (maintainer) Reported by: Charlie Li <ml+freebsd@vishwin.info> Changes: head/graphics/blender/Makefile Committed, thanks! |