• 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
Fwd: thin linking: "file is not of required architecture"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: thin linking: "file is not of required architecture"


  • Subject: Fwd: thin linking: "file is not of required architecture"
  • From: Philip Hölzenspies <email@hidden>
  • Date: Thu, 10 Apr 2008 16:03:45 +0100

Woops... I "reply"-d, as opposed to "reply-all"-ing. Sorry about that; See below.

Begin forwarded message:

From: Philip Hölzenspies <email@hidden>
Date: April 10, 2008 4:01:41 PM BST
To: Alastair Houghton <email@hidden>
Subject: Re: thin linking: "file is not of required architecture"

On Apr 10, 2008, at 1:33 PM, Alastair Houghton wrote:
What does it say if you do

ld -arch i386 -o application foo.o bar.o lib1.so lib2.so lib3.so

instead? i.e. write the object files first, then the libraries, not the other way around.


Dear Alastair, all,

I don't quite see where that should matter (unless we're now hacking away at ld's undocumented features). To prevent another bunch of iterations on what the call should look like exactly, I'll just post the actual call that I make to gcc:

gcc -arch i386 -Wall -no-cpp-precomp -Wno-unused -fno-builtin -arch i386 -Isac2c/include/ -Lsac2c/lib/ -L/tmp/SAC_nwXADZ -O3 -o quicksort_list quicksort_list.c -L. -L. -Lsac2c/lib -Lsac2c/lib - Lstdlib/modules/structures/lib -Lstdlib/modules/structures/lib - Lstdlib/modules/numerical/lib -Lstdlib/modules/numerical/lib - Lstdlib/world/system/lib -Lstdlib/world/system/lib -Lstdlib/world/ stdio/lib -Lstdlib/world/stdio/lib -Lstdlib/world/stdio/dislin/lib - Lstdlib/world/stdio/dislin/lib -Lstdlib/classes/random/lib -Lstdlib/ classes/random/lib -Lstdlib/utrace/lib -Lstdlib/utrace/lib -L. -L. -lMyListMod -lRandomMod -lStdIOMod -lBinFileMod -lScalarIOMod - lArrayIOMod -lFibreIOMod -lListIOMod -lComplexIOMod -lComplexMod - lIOresourcesMod -lListMod -lArrayFormatMod -lArrayMod -lMathArrayMod -lFileMod -lTermFileMod -lComplexArrayArithMod - lComplexArrayTransformMod -lComplexArrayBasicsMod - lComplexScalarArithMod -lArrayTransformMod -lTerminalMod - lFileSystemMod -lSysErrMod -lWorldMod -lConstantsMod -lArrayArithMod -lComplexBasicsMod -lMathMod -lBoolMod -lStringMod -lCharMod -lm - lArrayBasicsMod -lScalarArithMod -lsacpreludeMod -lsac_seq

Given this shit-load of libraries, I don't really care where they're placed in the call to ld; they default to something that should work when telling gcc to include some libraries. This works on Mac OS X 10.4, Linux, Solaris 9/10/11 and NetBSD. The first of these is most important; it worked under Mac OS X 10.4. Thus, only if the invocation interface of ld has changed in 10.5 should we look at the invocation. Otherwise, it should remain as is and the actual resolution mechanism should be understood.

This is the actual point I want to come to understand: How does ld do multi-architecture resolution? -OR- What does this specific ld invocation try to resolve? -OR- Can I let ld be so verbose that I can see which architecture check actually fails?

Regards,
Philip

_______________________________________________ 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
  • Prev by Date: Re: Debugging __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__
  • Next by Date: Re: thin linking: "file is not of required architecture"
  • Previous by thread: Re: thin linking: "file is not of required architecture"
  • Next by thread: Re: thin linking: "file is not of required architecture"
  • Index(es):
    • Date
    • Thread