Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#63108 closed defect (fixed)

gource 0.50_3 darwin_19 x86_64: ld: symbol(s) not found for architecture x86_64

Reported by: dcamper (Dan S. Camper) Owned by: Chris Jones <jonesc@…>
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc: cjones051073 (Chris Jones), reneeotten (Renee Otten)
Port: gource

Description

gource build fails on macOS 10.15.7 with:

:info:build Undefined symbols for architecture x86_64:
:info:build   "boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, boost::system::error_code*)", referenced from:
:info:build       boost::filesystem::directory_iterator::directory_iterator(boost::filesystem::path const&) in gource-gource_settings.o
:info:build   "boost::filesystem::absolute(boost::filesystem::path const&, boost::filesystem::path const&)", referenced from:
:info:build       RLogMill::findRepository(boost::filesystem::path&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in gource-logmill.o
:info:build ld: symbol(s) not found for architecture x86_64

Full build log enclosed.

Attachments (1)

gource.log (118.3 KB) - added by dcamper (Dan S. Camper) 3 years ago.
Build log

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by dcamper (Dan S. Camper)

Attachment: gource.log added

Build log

comment:1 Changed 3 years ago by reneeotten (Renee Otten)

Cc: cjones051073 reneeotten added

Dan, you likely have the boost port still installed, correct? If so, this is a (temporary) issue when switching over to the new boost portgroup. It does build correctly on the buildbot where only the new dependency boot176 will be present and you can, as a workaround, install it locally by building in trace mode (sudo port -t install gource).

The log shows that the boost include/lib directories are set correctly, but then add some point the -I/opt/local/include comes before -I/opt/local/libexec/boost/1.76/include which causes the trouble. I have seen this happening in other ports as well, but couldn't figure out how to enforce the correct order of the include statements.

Chris: is there something that can be done in the Portfile to ensure that this happens correctly? Otherwise ports will likely fail building in the situation where users still have the boost port present. I am happy to help and correct Portfiles when such issue are reported, I just don't really know how....

comment:2 Changed 3 years ago by cjones051073 (Chris Jones)

Yeah, I think the issue is base sets CPPFLAGS to

CPPFLAGS='-I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk'

and this is parsed first by the compiler, before the c++ specific CXXFLAGS which the boost PG adds the boost include dir to.

Probably the thing to do is to pre-pend the boost dir as well to CPPFLAGS to ensure its used first before anything under the main include area.

comment:3 Changed 3 years ago by Chris Jones <jonesc@…>

Owner: set to Chris Jones <jonesc@…>
Resolution: fixed
Status: newclosed

In aecea266e44e272c402d9fb64c63daf82a3b3afc/macports-ports (master):

boost PG: Append include dir to cppflags, use -I instead of -isystem
Closes: #63108

comment:4 Changed 3 years ago by cjones051073 (Chris Jones)

Should be fixed. I also switched from -I from -isystem to force the include dir to be used early.

comment:5 Changed 3 years ago by dcamper (Dan S. Camper)

Excellent information and fast response. Thank you! I've confirmed it now builds.

sudo port upgrade gource
--->  Computing dependencies for gource
--->  Fetching archive for gource
--->  Attempting to fetch gource-0.50_3.darwin_19.x86_64.tbz2 from https://packages.macports.org/gource
--->  Attempting to fetch gource-0.50_3.darwin_19.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/gource
--->  Attempting to fetch gource-0.50_3.darwin_19.x86_64.tbz2 from https://mse.uk.packages.macports.org/gource
--->  Staging gource into destroot
--->  Installing gource @0.50_3                          
--->  Cleaning gource
--->  Computing dependencies for gource
--->  Deactivating gource @0.50_2
--->  Cleaning gource
--->  Activating gource @0.50_3
--->  Cleaning gource
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
Note: See TracTickets for help on using tickets.