Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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)

main.log (16.3 KB) - added by ryandesign (Ryan Carsten Schmidt) 11 years ago.
patch-cmake-portgroup.diff (7.2 KB) - added by ryandesign (Ryan Carsten Schmidt) 11 years ago.
patch from Torsten Mähne

Download all attachments as: .zip

Change History (13)

Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log added

comment:1 Changed 11 years ago by dbevans (David B. Evans)

Status: newassigned
Summary: libproxy: universal variant vailslibproxy: universal variant fails

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jeremyhu@… added

Possibly, today's changes to the cmake portgroup broke this; I'm seeing the same failure with another cmake-using port too.

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: assignednew
Summary: libproxy: universal variant failscmake 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: newclosed

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:7 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicate #41204.

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:9 Changed 11 years ago by florian@…

Cc: florian@… added

Cc Me!

comment:10 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.

comment:11 in reply to:  10 Changed 11 years ago by florian@…

Thanks. Created #41256 as suggested.

Note: See TracTickets for help on using tickets.