• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can gcc 4 built binaries be used on 10.2 to 10.3.8? (undefined reference to _fprintf$LDBL128 expected to be defined in /usr/lib/libSystem.B.dylib)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can gcc 4 built binaries be used on 10.2 to 10.3.8? (undefined reference to _fprintf$LDBL128 expected to be defined in /usr/lib/libSystem.B.dylib)


  • Subject: Can gcc 4 built binaries be used on 10.2 to 10.3.8? (undefined reference to _fprintf$LDBL128 expected to be defined in /usr/lib/libSystem.B.dylib)
  • From: "E. Wing" <email@hidden>
  • Date: Thu, 1 Dec 2005 15:00:14 -0800

Hi, we're trying to figure out if we can build a library with gcc 4
but still be 10.2 to 10.3.8 compatible. Using gcc 3.3, our stuff
currently works on 10.2 to 10.4. But trying gcc 4 seems to not work
for anything less than 10.3.9. Looking towards Universal Binaries, it
would be convenient if we could just use gcc 4 for everything so we
can just hit the check boxes in Xcode. Our code base is pure C so we
don't have any of the C++ issues.

The recent Xcode 2.2/gcc 4.0.1 release dropped the automatic linking
to libgcc_s and libmx which gave us encouragement. But when we tried
running the gcc 4.0.1 built library on 10.2.8 we get the error:

undefined reference to _fprintf$LDBL128 expected to be defined in
/usr/lib/libSystem.B.dylib
Trace/BPT trap

Getting around this required exporting the MACOSX_DEPLOYMENT_TARGET=10.3
enviroment variable and doing a fresh build (although there are webpages
that claim building with -mlong-double-64 on the gcc command line might
get around this specific problem, there may be other similar issues)

Then, naturally, it's looking for libmx, so we dropped it to
MACOSX_DEPLOYMENT_TARGET=10.2, which reintroduced the _fprintf$LDBL128
issue...apparently the long double thing is hardcoded in
MACOSX_DEPLOYMENT_TARGET=10.3.

Then we built with -mlong-double-64 and MACOSX_DEPLOYMENT_TARGET=10.2,
which didn't help...same problem. So we gave up.

Setting the DEPLOYMENT_TARGET is probably a bad idea anyway since the
Universal Binary stuff in Xcode sets it to 10.4. But we would like to
know if there is something we can do to make this just work. (Our
alternatives seem to be modifying the build system to build once for
each architecture and writing scripts to lipo the things together, or
dropping Jaguar support which seems kind of silly to lose for just
this reason.)

Thanks,
Eric
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Can gcc 4 built binaries be used on 10.2 to 10.3.8? (undefined reference to _fprintf$LDBL128 expected to be defined in /usr/lib/libSystem.B.dylib)
      • From: Lawrence Gold <email@hidden>
  • Prev by Date: Re: static / extern fails in GCC 4
  • Next by Date: Re: Can gcc 4 built binaries be used on 10.2 to 10.3.8? (undefined reference to _fprintf$LDBL128 expected to be defined in /usr/lib/libSystem.B.dylib)
  • Previous by thread: Re: leak detecting vs memory
  • Next by thread: Re: Can gcc 4 built binaries be used on 10.2 to 10.3.8? (undefined reference to _fprintf$LDBL128 expected to be defined in /usr/lib/libSystem.B.dylib)
  • Index(es):
    • Date
    • Thread