Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#41106 closed defect (fixed)

simulavr @1.0.0_2 Link errors during build

Reported by: wichert@… Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: mavericks Cc: g5pw (Aljaž Srebrnič), twb@…, landonf@…
Port: simulavr

Description

Installing simulavr fails with a link error:

mv -f .deps/traceval.Tpo .deps/traceval.Plo
/bin/sh ../libtool --tag=CXX   --mode=link /usr/bin/clang++ -I/opt/local/avr/host/include -g -O2 -Icmd -Iui -Ihwtimer -version-info 0:0:0 -rpath /opt/local/lib -L/opt/local/avr/host/lib -lbfd -L/opt/local/avr/host/lib -liberty -lz -lintl -ltcl -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -o libsim.la -rpath /opt/local/lib adcpin.lo application.lo at4433.lo at8515.lo atmega668base.lo atmega128.lo at90canbase.lo atmega8.lo atmega1284abase.lo atmega16_32.lo attiny2313.lo externalirq.lo avrdevice.lo avrerror.lo avrfactory.lo avrmalloc.lo decoder.lo decoder_trace.lo flash.lo flashprog.lo hardware.lo helper.lo gdbserver.lo hwacomp.lo hwad.lo hweeprom.lo timerprescaler.lo prescalermux.lo timerirq.lo hwpinchange.lo hwport.lo hwspi.lo hwsreg.lo icapturesrc.lo hwstack.lo hwtimer.lo hwuart.lo hwwado.lo ioregs.lo irqsystem.lo keyboard.lo lcd.lo memory.lo mysocket.lo net.lo pin.lo extpin.lo pinatport.lo pinmon.lo rwmem.lo scope.lo serialrx.lo serialtx.lo spisrc.lo spisink.lo specialmem.lo string2.lo systemclock.lo traceval.lo ui.lo   
/bin/sh ../libtool --tag=CXX   --mode=link /usr/bin/clang++ -I/opt/local/avr/host/include -g -O2 -Icmd -Iui -Ihwtimer  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -o simulavr main.o dumpargs.o adcpin.lo application.lo at4433.lo at8515.lo atmega668base.lo atmega128.lo at90canbase.lo atmega8.lo atmega1284abase.lo atmega16_32.lo attiny2313.lo externalirq.lo avrdevice.lo avrerror.lo avrfactory.lo avrmalloc.lo decoder.lo decoder_trace.lo flash.lo flashprog.lo hardware.lo helper.lo gdbserver.lo hwacomp.lo hwad.lo hweeprom.lo timerprescaler.lo prescalermux.lo timerirq.lo hwpinchange.lo hwport.lo hwspi.lo hwsreg.lo icapturesrc.lo hwstack.lo hwtimer.lo hwuart.lo hwwado.lo ioregs.lo irqsystem.lo keyboard.lo lcd.lo memory.lo mysocket.lo net.lo pin.lo extpin.lo pinatport.lo pinmon.lo rwmem.lo scope.lo serialrx.lo serialtx.lo spisrc.lo spisink.lo specialmem.lo string2.lo systemclock.lo traceval.lo ui.lo   -L/opt/local/avr/host/lib -lbfd -L/opt/local/avr/host/lib -liberty  
libtool: link: /usr/bin/clang++ -I/opt/local/avr/host/include -g -O2 -Icmd -Iui -Ihwtimer -Wl,-headerpad_max_install_names -arch x86_64 -o simulavr main.o dumpargs.o .libs/adcpin.o .libs/application.o .libs/at4433.o .libs/at8515.o .libs/atmega668base.o .libs/atmega128.o .libs/at90canbase.o .libs/atmega8.o .libs/atmega1284abase.o .libs/atmega16_32.o .libs/attiny2313.o .libs/externalirq.o .libs/avrdevice.o .libs/avrerror.o .libs/avrfactory.o .libs/avrmalloc.o .libs/decoder.o .libs/decoder_trace.o .libs/flash.o .libs/flashprog.o .libs/hardware.o .libs/helper.o .libs/gdbserver.o .libs/hwacomp.o .libs/hwad.o .libs/hweeprom.o .libs/timerprescaler.o .libs/prescalermux.o .libs/timerirq.o .libs/hwpinchange.o .libs/hwport.o .libs/hwspi.o .libs/hwsreg.o .libs/icapturesrc.o .libs/hwstack.o .libs/hwtimer.o .libs/hwuart.o .libs/hwwado.o .libs/ioregs.o .libs/irqsystem.o .libs/keyboard.o .libs/lcd.o .libs/memory.o .libs/mysocket.o .libs/net.o .libs/pin.o .libs/extpin.o .libs/pinatport.o .libs/pinmon.o .libs/rwmem.o .libs/scope.o .libs/serialrx.o .libs/serialtx.o .libs/spisrc.o .libs/spisink.o .libs/specialmem.o .libs/string2.o .libs/systemclock.o .libs/traceval.o .libs/ui.o  -L/opt/local/lib -L/opt/local/avr/host/lib -lbfd -liberty 
libtool: link: /usr/bin/clang++ -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libsim.0.dylib  .libs/adcpin.o .libs/application.o .libs/at4433.o .libs/at8515.o .libs/atmega668base.o .libs/atmega128.o .libs/at90canbase.o .libs/atmega8.o .libs/atmega1284abase.o .libs/atmega16_32.o .libs/attiny2313.o .libs/externalirq.o .libs/avrdevice.o .libs/avrerror.o .libs/avrfactory.o .libs/avrmalloc.o .libs/decoder.o .libs/decoder_trace.o .libs/flash.o .libs/flashprog.o .libs/hardware.o .libs/helper.o .libs/gdbserver.o .libs/hwacomp.o .libs/hwad.o .libs/hweeprom.o .libs/timerprescaler.o .libs/prescalermux.o .libs/timerirq.o .libs/hwpinchange.o .libs/hwport.o .libs/hwspi.o .libs/hwsreg.o .libs/icapturesrc.o .libs/hwstack.o .libs/hwtimer.o .libs/hwuart.o .libs/hwwado.o .libs/ioregs.o .libs/irqsystem.o .libs/keyboard.o .libs/lcd.o .libs/memory.o .libs/mysocket.o .libs/net.o .libs/pin.o .libs/extpin.o .libs/pinatport.o .libs/pinmon.o .libs/rwmem.o .libs/scope.o .libs/serialrx.o .libs/serialtx.o .libs/spisrc.o .libs/spisink.o .libs/specialmem.o .libs/string2.o .libs/systemclock.o .libs/traceval.o .libs/ui.o   -L/opt/local/avr/host/lib -lbfd -liberty -lz -lintl -ltcl -L/opt/local/lib  -Wl,-headerpad_max_install_names -arch x86_64   -install_name  /opt/local/lib/libsim.0.dylib -compatibility_version 1 -current_version 1.0 -Wl,-single_module
Undefined symbols for architecture x86_64:
  "_compress", referenced from:
      _bfd_compress_section_contents in libbfd.a(compress.o)
     (maybe you meant: _bfd_init_section_compress_status, _bfd_is_section_compressed , _bfd_compress_section_contents )
  "_compressBound", referenced from:
      _bfd_compress_section_contents in libbfd.a(compress.o)
  "_inflate", referenced from:
      _bfd_get_full_section_contents in libbfd.a(compress.o)
  "_inflateEnd", referenced from:
      _bfd_get_full_section_contents in libbfd.a(compress.o)
  "_inflateInit_", referenced from:
      _bfd_get_full_section_contents in libbfd.a(compress.o)
  "_inflateReset", referenced from:
      _bfd_get_full_section_contents in libbfd.a(compress.o)
  "_libintl_dgettext", referenced from:
      __bfd_abort in libbfd.a(bfd.o)
      _bfd_errmsg in libbfd.a(bfd.o)
      _bfd_assert in libbfd.a(bfd.o)
      _bfd_cache_lookup_worker in libbfd.a(cache.o)
      __bfd_generic_get_section_contents in libbfd.a(libbfd.o)
      __bfd_generic_verify_endian_match in libbfd.a(libbfd.o)
      _warn_deprecated in libbfd.a(libbfd.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[3]: *** [simulavr] Error 1
make[3]: *** Waiting for unfinished jobs....

Attachments (2)

main.log (1.7 MB) - added by wichert@… 6 years ago.
patch-src_Makefile.in (1.2 KB) - added by twb@… 6 years ago.
New src/Makefile.in patch

Download all attachments as: .zip

Change History (13)

Changed 6 years ago by wichert@…

Attachment: main.log added

comment:1 Changed 6 years ago by ryandesign (Ryan Schmidt)

Cc: landonf@… removed
Owner: changed from macports-tickets@… to landonf@…

comment:2 Changed 6 years ago by g5pw (Aljaž Srebrnič)

Actually, simulavr is failing for me because of a missing libiberty. I suppose it expects the library to be installed with avr-gcc, but installing libiberty is somehow discouraged. What should we do?

comment:3 Changed 6 years ago by g5pw (Aljaž Srebrnič)

Cc: g5pw@… added

Cc Me!

comment:4 Changed 6 years ago by jake.guffey@…

Is anything being done to fix this?

comment:5 Changed 6 years ago by larryv (Lawrence Velázquez)

Cc: larryv@… added

Cc Me!

comment:6 Changed 6 years ago by cubemike99@…

I am also experiencing this issue.

comment:7 Changed 6 years ago by twb@…

Cc: twb@… added

Cc Me!

Changed 6 years ago by twb@…

Attachment: patch-src_Makefile.in added

New src/Makefile.in patch

comment:8 Changed 6 years ago by twb@…

Well, today's a good enough day to teach myself how ports work... I attached a modified version of the src/Makefile.in patch that properly adds -lz and -lintl to both the libsimulavr target AND the simulavr target. It seems to compile and run for me on 10.9.

comment:9 Changed 6 years ago by larryv (Lawrence Velázquez)

Cc: landonf@… added; larryv@… removed
Owner: changed from landonf@… to larryv@…
Status: newassigned

Thanks, but patching the source shouldn’t be necessary.

comment:10 Changed 6 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: assignedclosed

r117907 should do it.

comment:11 Changed 6 years ago by twb@…

Ahh, I see. I guess I didn't teach myself how ports work quite well enough. Thanks!

Note: See TracTickets for help on using tickets.