#41142 closed defect (fixed)
cmake portgroup changes cause build failures
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.1 |
Keywords: | Cc: | jeremyhu (Jeremy Huddleston Sequoia), maehne (Torsten Maehne), justin@…, dbevans (David B. Evans), florian@… | |
Port: |
Description
See log.
Attachments (2)
Change History (13)
Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
comment:1 Changed 11 years ago by dbevans (David B. Evans)
Status: | new → assigned |
---|---|
Summary: | libproxy: universal variant vails → libproxy: universal variant fails |
comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | jeremyhu@… added |
---|
comment:3 Changed 11 years ago by dbevans (David B. Evans)
Same here. In my case lib2geom, podofo so far.
Looks like they're failing during the preliminary compiler sanity check due to improper arch flags (not any) in the compile command (generates x86_64 only binary)
/usr/bin/clang -I/opt/local/include -o CMakeFiles/cmTryCompileExec692823937.dir/testCCompiler.c.o -c /opt/local/var/macports/build/_opt_macports_trunk_dports_graphics_podofo/podofo/work/podofo-0.9.2/CMakeFiles/CMakeTmp/testCCompiler.c
Link command does use universal arch flags which causes the error (no i386 symbols)
/usr/bin/clang -I/opt/local/include -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -arch i386 CMakeFiles/cmTryCompileExec692823937.dir/testCCompiler.c.o -o cmTryCompileExec692823937 ld: warning: ignoring file CMakeFiles/cmTryCompileExec692823937.dir/testCCompiler.c.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): CMakeFiles/cmTryCompileExec692823937.dir/testCCompiler.c.o Undefined symbols for architecture i386: "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture i386
comment:4 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Torsten emailed a patch that might fix the PortGroup. Please give it a try.
Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | patch-cmake-portgroup.diff added |
---|
patch from Torsten Mähne
comment:5 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | Torsten.Maehne@… justin@… devans@… added |
---|---|
Owner: | changed from devans@… to ryandesign@… |
Port: | libproxy removed |
Status: | assigned → new |
Summary: | libproxy: universal variant fails → cmake portgroup changes cause build failures |
I've attached his patch here and will commit it shortly, assuming things work.
Has duplicate #41168.
comment:6 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Looks good. Committed in r112944 with some minor changes (typos in comments, default value of optflags is -Os in MacPorts 2.2 not -O2, change string comparisons to ne instead of !=)
comment:8 Changed 11 years ago by florian@…
CMake's debug flags do not include optimization at all. With the cmake portgroup we get -Os. But debug symbols with optimization are not helpful (see comment:4:ticket:41203). Btw, CMake's default release flags are -O3 -DNDEBUG
and not -Os -DNDEBUG
. AFAIK, -Os
equals -O2
plus extra code size reduction.
comment:10 follow-up: 11 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
This ticket was about the recent changes to the cmake portgroup causing build failures. Those build failures have been resolved and therefore this ticket is closed. If you're proposing additional changes to the portgroup please file a new ticket.
Possibly, today's changes to the cmake portgroup broke this; I'm seeing the same failure with another cmake-using port too.