LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-26-2014, 10:01 AM   #1
delta67
LQ Newbie
 
Registered: Nov 2014
Posts: 5

Rep: Reputation: Disabled
Please help building a toolchain


Hi all
First, sorry if this is the wrong place, I don't know where I can post my question !

I'm bulding a toolchain for an i386 target using a linuxmint16 host.

I've succussfully built the following:
- binutils-2.22
- first pass gcc-4.6.4
- Installing linux-2.6.30 and eglibc-2.17 headers
- second gcc pass

But when I try to build the full eglibc I get this error:

Code:
-o /home/toto/mydev/build/eglibc/nptl/cleanup_compat.os -MD -MP -MF /home/toto/mydev/build/eglibc/nptl/cleanup_compat.os.dt -MT /home/toto/mydev/build/eglibc/nptl/cleanup_compat.os
make[2]: *** [/home/toto/mydev/build/eglibc/nptl/sem_post.os] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/home/toto/mydev/source/eglibc/nptl'
make[1]: *** [nptl/subdir_lib] Error 2
make[1]: Leaving directory `/home/toto/mydev/source/eglibc'
make: *** [all] Error 2
PLEASE help.
 
Old 11-26-2014, 02:46 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Are you following an LFS book? If not, I suggest you do.

http://www.linuxfromscratch.org/lfs

They have the whole system worked out fairly well.
 
Old 11-27-2014, 09:09 AM   #3
delta67
LQ Newbie
 
Registered: Nov 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks business_kid for the reply.
I'm following other tutorials found on the web.
 
Old 11-27-2014, 11:15 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Better post a url for whatever you are following. Looking for help here, you really have to explain clearly what you are doing.

What's the difference between first & second pass at GCC?

The toolchain usually consists of glibc(eglibc in your case) kernel headers, and gcc. So, to build eglibc, surely you will have to link it against the system glibc, which is not optimal, as it won't see the system glibc once you are running.

LFS does a static build using the*system tools, then a dynamic build using the static tools, and gets around issues that way. It's probably not building for embedded.

As for your error posted below in post #1: Error no. 1 is "Operation Not Permitted." Probably you have a permissions problem.
 
Old 11-28-2014, 12:31 AM   #5
delta67
LQ Newbie
 
Registered: Nov 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
Here is an url:

http://www.eglibc.org/archives/patches/msg00068.html
 
Old 11-28-2014, 01:12 AM   #6
brebs
Member
 
Registered: May 2013
Posts: 89

Rep: Reputation: Disabled
Quote:
Originally Posted by delta67 View Post
I get this error:
You haven't shown the real error message. You've only show the final result of the error msg. Look at the rest of the output.
 
Old 11-28-2014, 05:02 AM   #7
delta67
LQ Newbie
 
Registered: Nov 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
OK, here's more output:

Code:
-I../include -I/home/toto/mydev/build/eglibc/nptl -I/home/toto/mydev/build/eglibc -I../nptl/sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux/x86 -I../sysdeps/unix/sysv/linux/x86 -I../sysdeps/unix/sysv/linux/i386/nptl -I../sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/fpu -I../sysdeps/x86/fpu -I../nptl/sysdeps/i386 -I../sysdeps/i386 -I../sysdeps/x86 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I. -nostdinc -isystem /home/toto/mydev/tools/lib/gcc/i386-pc-linux/4.6.4/include -isystem /home/toto/mydev/tools/lib/gcc/i386-pc-linux/4.6.4/include-fixed -isystem /home/toto/mydev/sysroot/usr/include  -D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC -DSHARED -DNOT_IN_libc=1 -DIS_IN_libpthread=1 -DIN_LIB=libpthread    -o /home/toto/mydev/build/eglibc/nptl/cleanup.os -MD -MP -MF /home/toto/mydev/build/eglibc/nptl/cleanup.os.dt -MT /home/toto/mydev/build/eglibc/nptl/cleanup.os
../nptl/sysdeps/unix/sysv/linux/sem_trywait.c: In function ‘__new_sem_trywait’:
../nptl/sysdeps/unix/sysv/linux/sem_trywait.c:37:7: warning: implicit declaration of function ‘atomic_decrement_if_positive’ [-Wimplicit-function-declaration]
../nptl/sysdeps/unix/sysv/linux/sem_post.c: In function ‘__new_sem_post’:
../nptl/sysdeps/unix/sysv/linux/sem_post.c:43:3: warning: implicit declaration of function ‘atomic_compare_and_exchange_bool_rel’ [-Wimplicit-function-declaration]
../nptl/sysdeps/unix/sysv/linux/sem_post.c:45:3: warning: implicit declaration of function ‘atomic_full_barrier’ [-Wimplicit-function-declaration]
../nptl/sysdeps/unix/sysv/linux/sem_post.c:48:17: error: expected expression before ‘do’
../nptl/sysdeps/unix/sysv/linux/sem_post.c: In function ‘__old_sem_post’:
../nptl/sysdeps/unix/sysv/linux/sem_post.c:68:3: warning: implicit declaration of function ‘atomic_increment_val’ [-Wimplicit-function-declaration]
../nptl/sysdeps/unix/sysv/linux/sem_post.c:70:13: error: expected expression before ‘do’
make[2]: *** [/home/toto/mydev/build/eglibc/nptl/sem_post.os] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/home/toto/mydev/source/eglibc/nptl'
make[1]: *** [nptl/subdir_lib] Error 2
make[1]: Leaving directory `/home/toto/mydev/source/eglibc'
make: *** [all] Error 2
 
Old 11-28-2014, 11:33 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Code:
../nptl/sysdeps/unix/sysv/linux/sem_post.c:43:3: warning: implicit declaration of function ‘atomic_compare_and_exchange_bool_rel’ [-Wimplicit-function-declaration]
../nptl/sysdeps/unix/sysv/linux/sem_post.c:45:3: warning: implicit declaration of function ‘atomic_full_barrier’ [-Wimplicit-function-declaration]
../nptl/sysdeps/unix/sysv/linux/sem_post.c:48:17: error: expected expression before ‘do’
../nptl/sysdeps/unix/sysv/linux/sem_post.c: In function ‘__old_sem_post’:
../nptl/sysdeps/unix/sysv/linux/sem_post.c:68:3: warning: implicit declaration of function ‘atomic_increment_val’ [-Wimplicit-function-declaration]
In that lot, the 'implicit declaration of function' stuff means this: All functions should be declared, and their type set before they are referenced in code. These are not defined, but just appear in the code.

That implies you are missing at least one file to include with the above. You have your system set up in /home/toto. Try something like
Code:
cd /home/toto
grep -re 'atomic_compare_and_exchange_bool_rel' * |less
you are looking for that in a header (.h) file, as usually found in /usr/include & subdirs. In this setup I don't know where they will be. Make sure that file is referenced, or symlink it in one of those subdirs. If the grep only shows that in .c files and it doesn't appear in an include, you need to install more stuff.

The "error expected expression before ‘do’ " looks more like a syntax error, but I wouldn't worry about that until you sort the others, as it will probably go away of it's own accord.

BTW, I am an amateur with C :-P.

I looked at the guide. I note it's for developers, not the public. Good luck with it.
 
Old 12-02-2014, 10:25 AM   #9
delta67
LQ Newbie
 
Registered: Nov 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
There's a bug in eglibc-2.17 !!
Probleme solved when migrating to 2.18.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Building ARM toolchain mr.simo Linux - Software 2 07-25-2014 06:38 AM
Building ARM toolchain mr.simo Linux - Software 1 07-25-2014 04:04 AM
[SOLVED] LFS 7.5 building toolchain error Fryndr Linux From Scratch 7 06-08-2014 03:51 PM
building of toolchain for ARM board seema_17 Linux - Newbie 2 07-21-2013 07:31 PM
Building cross-compiling toolchain radhapriya Linux - Software 1 06-25-2004 12:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration