NickThePowerful / iphone-dev

Automatically exported from code.google.com/p/iphone-dev
0 stars 0 forks source link

Compiling LLVM-GCC fails on Leopard #92

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Configure and make LLVM-GCC. Make sure that $LLVMOBJDIR and $HEAVENLY are set 
per the 
instructions above.
$ mkdir -p build/llvm-gcc-4.0-iphone
$ pushd build/llvm-gcc-4.0-iphone
$ ../../llvm-gcc-4.0-iphone/configure --enable-llvm=`llvm-config --obj-root` \
--enable-languages=c,c++,objc,obj-c++ --target=arm-apple-darwin --enable-sjlj-
exceptions \
--with-heavenly=$HEAVENLY --with-as=/usr/local/bin/arm-apple-darwin-as \
--with-ld=/usr/local/bin/arm-apple-darwin-ld
$ make LLVM_VERSION_INFO=2.0-svn-iphone-dev-0.3-svn 
$ sudo make install

What is the expected output?
expected the install to complete

What do you see instead?
/usr/local/bin/arm-apple-darwin-ld: warning unknown -macosx_version_min 
parameter value: 
10.5.0 ignored (using 10.1)
/usr/local/bin/arm-apple-darwin-ld: can't locate file for: -ldylib1.10.5.o
collect2: ld returned 1 exit status
make[2]: *** [libgcc_s.dylib] Error 1
make[1]: *** [stmp-multilib] Error 2
make: *** [install-gcc] Error 2

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by Xanth...@gmail.com on 28 Oct 2007 at 2:40

GoogleCodeExporter commented 9 years ago
This was on Leopard BTW>

Original comment by Xanth...@gmail.com on 28 Oct 2007 at 2:41

GoogleCodeExporter commented 9 years ago
Same problem here.  So close, yet so far!

Original comment by patrick....@gmail.com on 28 Oct 2007 at 5:48

GoogleCodeExporter commented 9 years ago
Here's a temporary work-around.  In llvm-gcc-4.0-iphone/configure change the 
initialization of 
FLAGS_FOR_TARGET from:
FLAGS_FOR_TARGET=
to:
FLAGS_FOR_TARGET=${FLAGS_FOR_TARGET-}
Then before the configure set:
export FLAGS_FOR_TARGET="-mmacosx-version-min=10.1"
When compiling with the resulting tool you will still need to use 
"arm-apple-darwin-gcc -mmacosx-
version-min=10.1" but at least it will work.

Original comment by dufa...@hda.com on 29 Oct 2007 at 12:10

GoogleCodeExporter commented 9 years ago
That worked great!  You're a savior!

Now just working out why my code is no longer valid on the new toolchain! ;)

Original comment by patrick....@gmail.com on 29 Oct 2007 at 3:08

GoogleCodeExporter commented 9 years ago
I still get an error...
Different error but still an error...

/usr/local/bin/arm-apple-darwin-ld: can't locate file for: -lc
collect2: ld returned 1 exit status
make[2]: *** [libgcc_s.dylib] Error 1
make[1]: *** [stmp-multilib] Error 2
make: *** [all-gcc] Error 2

Original comment by kdbdal...@gmail.com on 29 Oct 2007 at 5:03

GoogleCodeExporter commented 9 years ago
You set your HEAVENLY directory incorrectly I believe.  I had that too.

Original comment by patrick....@gmail.com on 29 Oct 2007 at 5:40

GoogleCodeExporter commented 9 years ago
I was trying to use my old phonedmg folder. Once I create a folder which has all
filesystem in it, it worked fine. Thanks

Original comment by kdbdal...@gmail.com on 29 Oct 2007 at 6:13

GoogleCodeExporter commented 9 years ago
"Then before the configure set:
export FLAGS_FOR_TARGET="-mmacosx-version-min=10.1"

I am kind of lost as to where this is supposed to be set. Any help would be 
appreciated.

Original comment by palo_cl...@hotmail.com on 29 Oct 2007 at 10:54

GoogleCodeExporter commented 9 years ago
You run that command before the configure.  For example here would be the 
sequence to do AFTER you 
change the configure script detailed above in step #3:

$ mkdir -p build/llvm-gcc-4.0-iphone
$ pushd build/llvm-gcc-4.0-iphone
$ export FLAGS_FOR_TARGET="-mmacosx-version-min=10.1"
$ ../../llvm-gcc-4.0-iphone/configure --enable-llvm=`llvm-config --obj-root` \
--enable-languages=c,c++,objc,obj-c++ --target=arm-apple-darwin 
--enable-sjlj-exceptions \
--with-heavenly=$HEAVENLY --with-as=/usr/local/bin/arm-apple-darwin-as \
--with-ld=/usr/local/bin/arm-apple-darwin-ld
$ make LLVM_VERSION_INFO=2.0-svn-iphone-dev-0.3-svn 
$ sudo make install
$ popd
$ popd

Original comment by patrick....@gmail.com on 29 Oct 2007 at 11:08

GoogleCodeExporter commented 9 years ago
I'm hoping issue 83 will fix this problem, without having to resort to messy
work-arounds.

We will see.

Original comment by Phi...@gmail.com on 30 Oct 2007 at 7:43

GoogleCodeExporter commented 9 years ago
It may just be me, but you may want to give it a shot: I managed to get rid of 
the
problem by putting first in the PATH and LD_LIBRARY_PATH the Developer 
directories.

IE:

PATH=/Developer/usr/bin:/Developer/usr/sbin:${PATH}
LD_LIBRARY_PATH=/Developer/usr/lib:${LD_LIBRARY_PATH}
export PATH
export LD_LIBRARY_PATH

The ld under /usr/bin and /Developer/usr/bin are different, as you may notice 
by a
quick diff.

Original comment by fabb...@gmail.com on 19 Nov 2007 at 12:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I made through the leopard howto from here 
<http://jiggyapp-devel.googlegroups.com/web/iphone_leopard_toolchain_howto.rtf>
until step 13, I got the following error after doing:

  $ make LLVM_VERSION_INFO=2.0-svn-iphone-dev-0.3-svn

configure: error: cannot execute: /usr/local/bin/arm-apple-darwin-ld: check 
--with-ld or env. var. 
DEFAULT_LINKER
make: *** [configure-gcc] Error 1

not really knowing what I was doing I tried setting the DEFAULT_LINKER env. 
var. to /usr/bin/ld and when that 
failed to /Developer/usr/bin/ld, but no avail. 

Somebody able to help an idiot out?

Original comment by kep...@gmail.com on 9 Feb 2008 at 10:51

GoogleCodeExporter commented 9 years ago
I did the workaround, but I am still getting the same error...

I even tried fabbari's exports.

Any ideas?

Original comment by cws...@gmail.com on 9 Mar 2008 at 2:24

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
=*SJ99 - iPhone toolchain SDK v2.0.1*=

==Support Leopard & Snow Leopard (MAC OS 10.5.x & 10.6.x) Perfectly.==
==Support iPhone OS v3.x & 4.x==

Please open this link to view detail:  
http://www.sj99.com/toolchain.html

Usually, in order to develop iPhone toolchain applications, the beginners need 
to download several crosslink package and configure many complicated settings, 
it's very hard to config, complie, and link the toolchain successfully in a 
fews days. Almost 99% of the beginners will encounter several problems, and 
more than half them will gave up.

From now on, everything is easy. All you have to do is just buy/download this 
SJ99 iPhone Toolchain SDK, and install it on your Mac computer, only need to 
click the mouse several times.  It's a good news to all of the iPhone toolchain 
developers. 

[http://www.sj99.com/toolchain/TOOLCHAINSDK-en.png]

SJ99 - iPhone Toolchain SDK

Develop and Distribute Toolchain Application, General Flow:

 [http://www.sj99.com/toolchain/flow.jpg] 

SJ99 - iPhone Toolchain SDK, Installation Screen Snap:

[http://www.sj99.com/toolchain/sj99-iphone-toolchain-1.jpg]

After installed successfully, you can found all of the necessary dev-tools is 
ready on your computer:

There are some Demo Apps with source code that you can find them after 
installed the SDK. They are very easy to learn and test on the real iPhone.

For example, If you want to run one of the Demo App: testapp, just step into 
the source code folder, and run command line: $ make

After run make successfully, you can find the new executable program:test was 
created in the same folder.

Now let's run it on the real iPhone, it's very easy: 
1st. Config your iphone WIFI to link your Mac in a same local network, edit the 
iPhone_ip_address config file on your Mac
2nd. Run a simple command line: $ make up
OK, the script will upload the test program file onto your iPhone, and sign it 
automatically.

Example: You can find the executable file:test  in the /tmp folder on your 
iPhone:

Now you can run it by the terminal App on the iPhone:

This is just a very simple demo. You can use this SDK to develop powerful and 
fully functional iPhone applications.
In order to improve the dev efficiency, we recommend developers using Xcode to 
develop the UI and common functions, just leave all of the underlying/bottom 
functions to Toolchain SDK. It's very easy and suitable for the Xcode project 
to link the dylib file which was complied by Toolchain SDK.

The newest v2.1 version now is available. It has been optimized and support all 
of the XCODE versions, all of the iPhone OS versions, and all of the Apple 
iPhone SDK versions. The v2.1 contain more important demo project source code, 
include dylib project and Xcode UI project which can link and call the api that 
was implemented in a dylib library. 

Please open this link to view detail:  
http://www.sj99.com/toolchain.html

Copyright (C) 2010, SJ99.com Innovation for Dev&Art. Email: sj99com@gmail.com

Original comment by SJ99...@gmail.com on 5 Sep 2010 at 2:37