trying to compile
I am having a problem I have never experienced in many years of slackware use. I am putting Slack 14.0 on a BeagleBone Black (instead of Debian) and have it up and running except that gcc silently fails. By that, I mean it runs cc1 without producing an output file, a complaint, an error message, anything, and stops there. I have installed d/binutils, d/gcc, l/glibc, l/gmp, and l/libmpc. What am I missing?
|
Let's see the exact error message.
|
Are the glibc-solibs installed ?
What do you get if you execute Code:
gcc -v If you try compiling a really simple thing (like just printing on stdo "hello world") what do you get ? and what's the return code of gcc ? (supposing it silently produced nothing) |
Quote:
|
Quote:
Quote:
Reading specs from /usr/lib/gcc/arm-slackware-linux-gnueabi/4.7.1/specs COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/arm-slackware-linux-gnueabi/4.7.1/lto-wrapper Target: arm-slackware-linux-gnueabi Configured with: ../gcc-4.7.1/configure --with-arch=armv5te --with-float=soft --disable-werror --prefix=/usr --mandir=/usr/man --infodir=/usr/info --libdir=/usr/lib --enable-bootstrap --enable-checking=release --with-system-zlib --disable-libunwind-exceptions --with-python-dir=/lib/python2.7/site-packages --enable-shared --enable-languages=ada,c,c++,fortran,java,objc,lto --enable-objc-gc --enable-threads=posix --enable-__cxa_atexit --enable-libssp --enable-lto --with-gnu-ld --verbose --enable-java-home --with-java-home=/usr/lib/jvm/jre --with-jvm-root-dir=/usr/lib/jvm --with-jvm-jar-dir=/usr/lib/jvm/jvm-exports --with-arch-directory= --with-antlr-jar=/root/slackware64-current/source/d/gcc/antlr-runtime-3.4.jar --enable-java-awt=gtk --disable-gtktest --host=arm-slackware-linux-gnueabi --build=arm-slackware-linux-gnueabi --target=arm-slackware-linux-gnueabi Thread model: posix gcc version 4.7.1 (GCC) Note that this is just the stock compiler from the slackarm 14.0 distribution. Quote:
|
Ok ... what if you tell it to compile with verbose flag, should give you some clues as to where it's failing
Code:
drao@darkstar:~$ gcc -v -Wall -save-temps -o hello_worls hello_world.c Your problem inspired me to look into the compilation process step by step ... you can try this step by step to see where your compilation process is failing (sorry some of the timestamps below are wonky ... I was learning something myself while producing it): Code:
drao@darkstar:~$ cat hello_world.c |
Quote:
Code:
|
It looks like it preprocessed not sure if it assembled ... try that again and add the "-Wall -save-temps" flags and see if you get <whatever>.s ... but since it's returning 1 I think it's not assembling. Are binutils installed ?
You also need these libraries along with glibc-solibs and gcc itself to use gcc: glibc zlib binutils glibc-i18n glibc-profile glibc-zoneinfo mpfr libmpc gpm If they are all installed you might want to reinstall them all again (just incase the installation was corrupt): gcc glibc glibc-i18n glibc-profile glibc-solibs glibc-zoneinfo zlib binutils mpfr libmpc gpm Hope I didn't forget anything |
Quote:
|
Quote:
|
Too much time went by and I forgot how I got the list ... surely I don't know them off the top of my head and ldd on the pieces required to do the single steps did not get me back the full list ... maybe I googled: Prerequisites for GCC ... it's not specific for Slackware (that might not use ISL) but it gives you an idea of what you might need to get gcc to work right.
Good to know that I was helpful ... you can reward helpful posts by clicking on the "yes" right beside "Did you find this post helpful?" |
Quote:
Quote:
|
Just my US$0.02:
When I have a complicated process that fails for no obvious, visible reason, I find "strace" very handy. I capture its output to a log, then pick through processes to search for the last fork/exec, and/or first failing exit. That's the first clue to follow. Additionally, GCC's default error exit code of 1 can be overridden with the "-pass-exit-codes" option, which passes back the highest error code of any sub-process back to the top level. |
@gearheadgeek: Head over to the linuxfromscratch.org website and they list the requirements for gcc. They are building from scratch. I presume the language you are compiling changes those requirements. I suggest the chapter 6 list
http://www.linuxfromscratch.org/lfs/view/stable/ |
Maybe I completed the list with this:
Code:
bash-4.2# gcc -v t.c |
All times are GMT -5. The time now is 07:26 AM. |