Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1858 (closed defect: invalid)

Opened 11 years ago

Last modified 11 years ago

[mac] linking libtango.a, made by bob.sh, fails

Reported by: Digited Assigned to: larsivi
Priority: major Milestone: 1.0
Component: Tango Version: 0.99.9 Kai
Keywords: mac bob Cc:

Description

Mac 10.5.8 Intel 32bit, gcc 4.0.1 and 4.2 (tried with both, and also with llvm-ld): dmd and ldc compile modules successfully, but linking to binary with libtango.a, made by executing bob.sh, fails with (all) missing symbols from tango:

1. sh ./build/script/bob.sh dmd 2. move libtango.a to lib folder, setup dmd.conf 2. dmd test.d or dmd -c test.d && ld test.o -ltango or dmd -c test.d && gcc test.o -L-ltango

(... lots of missing symbols from all .o in libtango.a, here is the small part ...)

_D5tango4text6locale4Data11CultureData21getDataFromRegionNameFKAaZPS5tango4text6locale4Data11CultureData in libtango.a(tango.text.locale.Data.o)
  "_D6object9Exception5_ctorMFAaAalC9ExceptionZC9Exception", referenced from:
      _D5tango4core9Exception20OutOfMemoryException5_ctorMFAalZC5tango4core9Exception20OutOfMemoryException in libtango.a(tango.core.Exception.o)
      _D5tango4core9Exception15AssertException5_ctorMFAalZC5tango4core9Exception15AssertException in libtango.a(tango.core.Exception.o)
      _D5tango4core9Exception15AssertException5_ctorMFAaAalZC5tango4core9Exception15AssertException in libtango.a(tango.core.Exception.o)
      _D5tango4core9Exception20ArrayBoundsException5_ctorMFAalZC5tango4core9Exception20ArrayBoundsException in libtango.a(tango.core.Exception.o)
      _D5tango4core9Exception15SwitchException5_ctorMFAalZC5tango4core9Exception15SwitchException in libtango.a(tango.core.Exception.o)
  "_D16TypeInfo_Pointer6__vtblZ", referenced from:
      _D44TypeInfo_PS5tango4core6Thread6Thread7Context6__initZ in libtango.a(tango.core.Thread.o)
  "__d_arraycatT", referenced from:
      _D5tango2io6device7Conduit7Conduit4seekMFlE5tango2io5model8IConduit8IOStream6AnchorZl in libtango.a(tango.io.device.Conduit.o)
      _D5tango4stdc7stringz11toString16zFAuZPu in libtango.a(tango.stdc.stringz.o)
      _D5tango4stdc7stringz11toString32zFAwZPw in libtango.a(tango.stdc.stringz.o)
      _D5tango4text6locale5Posix14setUserCultureFiZv in libtango.a(tango.text.locale.Posix.o)
      _D5tango4text6locale5Posix14setUserCultureFiZv in libtango.a(tango.text.locale.Posix.o)
      _D5tango4text6locale5Posix13compareStringFiAakkAakkbZi in libtango.a(tango.text.locale.Posix.o)
  "_D6Object7__ClassZ", referenced from:
      _D5tango4text7convert6Layout13__T6LayoutTaZ6Layout7__ClassZ in libtango.a(tango.io.Stdout.o)
      _D5tango2io6device7Conduit7Conduit7__ClassZ in libtango.a(tango.io.device.Conduit.o)
      _D5tango2io6device7Conduit11InputFilter7__ClassZ in libtango.a(tango.io.device.Conduit.o)
      _D5tango2io6device7Conduit12OutputFilter7__ClassZ in libtango.a(tango.io.device.Conduit.o)
      _D5tango2io7Console7Console5Input7__ClassZ in libtango.a(tango.io.Console.o)
      _D5tango2io7Console7Console6Output7__ClassZ in libtango.a(tango.io.Console.o)
      __TMP2 in libtango.a(tango.core.Thread.o)
      __TMP14 in libtango.a(tango.core.Thread.o)
      _D5tango4core6Thread6Thread7__ClassZ in libtango.a(tango.core.Thread.o)
      _D5tango4core6Thread11ThreadGroup7__ClassZ in libtango.a(tango.core.Thread.o)
      __TMP90 in libtango.a(tango.core.Thread.o)
      _D5tango4core6Thread5Fiber9Scheduler7__ClassZ in libtango.a(tango.core.Thread.o)
      _D5tango4core6Thread5Fiber7__ClassZ in libtango.a(tango.core.Thread.o)
      _D5tango4time6chrono8Calendar8Calendar7__ClassZ in libtango.a(tango.time.chrono.Calendar.o)
  "_D13TypeInfo_Enum7__ClassZ", referenced from:
      _D13TypeInfo_Enum7__ClassZ$non_lazy_ptr in libtango.a(tango.io.Stdout.o)
  "_D16TypeInfo_Typedef6__vtblZ", referenced from:
      _D54TypeInfo_T5tango2io5model8IConduit11ISelectable6Handle6__initZ in libtango.a(tango.io.model.IConduit.o)
      _D44TypeInfo_T5tango4stdc5posix8langinfo7nl_item6__initZ in libtango.a(tango.stdc.posix.langinfo.o)
  "_D10TypeInfo_l6__initZ", referenced from:
      internal in test.o
      _D48TypeInfo_E5tango4time4Time8TimeSpan11__anonymous6__initZ in libtango.a(tango.time.Time.o)
      _D44TypeInfo_E5tango4time4Time4Time11__anonymous6__initZ in libtango.a(tango.time.Time.o)
  "__aaKeys", referenced from:
      _D5tango4core6Thread11ThreadGroup7opApplyMFDFKC5tango4core6Thread6ThreadZiZi in libtango.a(tango.core.Thread.o)
      _D5tango4core6Thread11ThreadGroup7joinAllMFbZv in libtango.a(tango.core.Thread.o)
  "_D14TypeInfo_Tuple6__vtblZ", referenced from:
      _D71TypeInfo_B59AalE5tango4core7Version5TangoE5tango4core7Version5TangoAaAa6__initZ in test.o
  "_D16TypeInfo_Typedef7__ClassZ", referenced from:
      _D16TypeInfo_Typedef7__ClassZ$non_lazy_ptr in libtango.a(tango.io.Stdout.o)
  "_D11TypeInfo_Aw6__initZ", referenced from:
      _D11TypeInfo_Aw6__initZ$non_lazy_ptr in libtango.a(tango.io.Stdout.o)
      _D11TypeInfo_Aw6__initZ$non_lazy_ptr in libtango.a(tango.text.convert.Float.o)
      _D11TypeInfo_Aw6__initZ$non_lazy_ptr in libtango.a(tango.io.stream.Format.o)
      _D11TypeInfo_Aw6__initZ$non_lazy_ptr in libtango.a(tango.text.convert.DateTime.o)
      _D11TypeInfo_Aw6__initZ$non_lazy_ptr in libtango.a(tango.text.convert.Utf.o)
      _D11TypeInfo_Aw6__initZ$non_lazy_ptr in libtango.a(tango.text.convert.Layout.o)
      _D11TypeInfo_Aw6__initZ$non_lazy_ptr in libtango.a(tango.stdc.stringz.o)

Same with compiling libtango.a by bob.sh with ldc and linking with it (or llvm-ld).

Change History

02/12/10 16:23:13 changed by larsivi

  • status changed from new to assigned.
  • owner changed from kris to larsivi.

02/14/10 11:36:05 changed by larsivi

  • status changed from assigned to closed.
  • resolution set to invalid.

Looking closer, it appears that bob.sh has not been correctly called - the linking errors are due to missing runtime functionality. If you wish that in the same library as the rest of tango, you must apply both of the switches --user and --runtime (see also --help).