anarkia7115 / iphone-dev

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

"buffer overflow detected - arm-apple-darwin-ranlib terminated" while building llvm-gcc-4.0-iphone #177

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attempt to perform the whole process on the "Building" wiki page.
2. Discover that llvm-svn revision 42498 is unbuildable with g++ 4.3.2
as-is, painstakingly add #includes one-by-one until build succeeds.
3. Attempt to download my iPhone's filesystem using scp, only to discover
that you can't copy some of the stuff in the /dev directory, and scp
follows all the symlinks on the phone resulting in multiple copies of the
same stuff. End up copying over directories one-by-one, making sure to
avoid the symlinks and recreate them manually.  Ignore the Media directory,
as it contains about 30 gigs of music and pictures which are not needed.
4. Discover that an old xcode 2.4 or 2.5 DMG is needed to extract
MacOSX10.4.Universal.pkg, NOT the current version on Apple's website
(3.1.2).  After figuring that out, I was able to extract the pkg using the
instructions in the comment by PhireN. "HOWTO obtain the Mac OSX headers"
really should mention this.
5. Attempt to build llvm-gcc-4.0-iphone. Build fails with "*** buffer
overflow detected ***" on arm-apple-darwin-ranlib. Attempt to "plow through
it" as suggested by several comments... running 'make' over and over and
getting a little farther each time. Finally the build fails with "load
command 7 unknown cmd field".
6. Follow the steps in Comment 2 of Issue 153, which include:
 - Switching over 'include' and 'odcctools' repositories for updates
 - Patching lib1funcs.asm
7. Rebuild llvm-svn and odcctools again from scratch.
8. Attempt to build llvm-gcc-4.0-iphone again. Again, "plow through" the
buffer overflow errors by rerunning make over and over. Before, the
"unknown cmd field" error appeared after only 4 makes.  This time I'm
getting much farther, which leads me to believe that the updates or the
patches had SOME effect.
9. Run into a brick wall after rerunning make 12 or 13 times. The build
still fails on the ranlib "buffer overflow" each time, but it seems to have
stopped making any forward progress. The last thing I see every time before
the buffer overflow is: 
 file: .libs/libsupc++convenience.a(eh_arm.o) has no symbols

What is the expected output? What do you see instead?
Expected output: A successful build.
Actual output: ranlib "buffer overflow" error in the build process that
multiple 'make's won't cure.

What version of the product are you using? On what operating system?
 - Kubuntu 4.10
 - iphone-dev SVN as of April 12, 2009

Please provide any additional information below.

Original issue reported on code.google.com by josh2...@gmail.com on 12 Apr 2009 at 6:17

GoogleCodeExporter commented 9 years ago
What version of gcc/g++? I got the buffer overflow messages while using gcc/g++ 
4.3.
I downgraded to 4.2 and it all compiled just fine! Try that (don't forget to 
change
the gcc/g++ symlinks to point to 4.2 instead of 4.3).

Original comment by undefinedspace on 14 Apr 2009 at 3:24

GoogleCodeExporter commented 9 years ago
Indeed, I'm using gcc 4.3.2 that comes with Kubuntu 4.10.  In the meantime, I've
started down this path:  http://code.google.com/p/iphonedevonlinux  which is a 
lot
newer and looks custom-made for Linux.  If it doesn't work I'll certainly come 
back
to this method and try to rebuild everything with gcc 4.2.  Thanks for the 
advice!

Original comment by josh2...@gmail.com on 14 Apr 2009 at 2:16