Opened 12 years ago

Closed 12 years ago

#32123 closed defect (fixed)

bwm-ng @0.6 ld: symbol(s) not found for architecture x86_64

Reported by: nonstop.server@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: clang Cc: ranauei@…
Port: bwm-ng

Description

Port bwm-ng @0.6 fails to build.

/Developer/usr/bin/clang  -pipe -O2 -arch x86_64 -Wno-long-double -Wno-long-long
  -L/opt/local/lib -arch x86_64 -o bwm-ng  bwm-ng.o process.o output.o options.o
 help.o curses_tools.o retrieve.o getifaddrs.o sysctl.o ioservice.o netstat.o -lncurses  -framework IOKit -framework CoreFoundation
Undefined symbols for architecture x86_64:
  "_get_iface_stats", referenced from:
      _main in bwm-ng.o
      _handle_gui_input in curses_tools.o
     (maybe you meant: _get_iface_stats_getifaddrs, _get_iface_stats_sysctl , _get_iface_stats_netstat )
  "_dyn_byte_value2str", referenced from:
      _values2str in output.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bwm-ng] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_bwm-ng/bwm-ng/work/bwm-ng-0.6/src'
make[1]: *** [all-recursive] Error 1

Version Information:

Mac OS Version:
Darwin 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug  9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64

Xcode Version:
Xcode 4.2
Build version 4D199

Macports Version:
Version: 2.0.3

Attachments (3)

main.log (22.2 KB) - added by nonstop.server@… 12 years ago.
macports_bwm-ng_install.log (20.9 KB) - added by nonstop.server@… 12 years ago.
Portfile.diff (1.0 KB) - added by ranauei@… 12 years ago.
Strips inline if clang is the compiler and modernized checksums

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by nonstop.server@…

Attachment: main.log added

Changed 12 years ago by nonstop.server@…

Attachment: macports_bwm-ng_install.log added

comment:1 Changed 12 years ago by nonstop.server@…

Thank you very much for your advice in ticket #32124 to use llvm-gcc-4.2 instead.
After cleaning the failed build the program compiled fine using llvm-gcc-4.2.

sudo port -d clean --all bwm-ng 2>&1 |tee -a macports_bwm-ng_clean.log

sudo port -d install bwm-ng configure.compiler=llvm-gcc-4.2 2>&1 |tee -a macports_bwm-ng_install.log

port installed name:bwm-ng
The following ports are currently installed:
  bwm-ng @0.6_0 (active)

comment:2 Changed 12 years ago by ranauei@…

It's because clang interpret differently inline from gcc (C99 vs GNU89) see http://clang.llvm.org/compatibility.html#inline I attached a patched Portfile that strips inline from sources with it wich permits to bwm-ng to be compiled fine with clang.

Changed 12 years ago by ranauei@…

Attachment: Portfile.diff added

Strips inline if clang is the compiler and modernized checksums

comment:3 Changed 12 years ago by ranauei@…

Cc: ranauei@… added

Cc Me!

comment:4 Changed 12 years ago by jmroot (Joshua Root)

Keywords: clang added; net removed
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.