Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
glibc compiling
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Thomas8
n00b
n00b


Joined: 05 Apr 2010
Posts: 4

PostPosted: Mon Apr 05, 2010 4:12 pm    Post subject: glibc compiling Reply with quote

Hello,

I try to compile the glibc-2.6.1, but i have an error and i don't find any solution:
Code:
...
bcopy.c:21:1: warning: "memmove" redefined
In file included from ../include/bits/string3.h:1,
                 from ../string/string.h:428,
                 from ../include/string.h:49,
                 from bcopy.c:19:
../string/bits/string3.h:55:1: warning: this is the location of the previous
definition
In file included from bcopy.c:29:
./memmove.c:42: error: expected identifier or '(' before 'void'
./memmove.c:42: error: expected ')' before '(' token
./memmove.c:46: error: expected identifier or '(' before '{' token
...


could you help me?
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Mon Apr 05, 2010 4:41 pm    Post subject: Reply with quote

Yes, but first you need to post more of the output, just as it says "post the topmost error".
It means scroll up using shift+pgup to Error 1 and post from a few lines above that all the way to the bottom.

If you have difficulty with copy/paste, then you can use the following method:
Take a note of the location of the location of the complete build.log of the failed glibc emerge, then run:
Code:
emerge wgetpaste
wgetpaste <path-to-build.log>


And also post the output of this please:
Code:
emerge --info

Like this:
Code:
emerge --info | wgetpaste


Then paste the URLs here, and we'll have a look.


Last edited by Mike Hunt on Mon Apr 05, 2010 4:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Mon Apr 05, 2010 4:46 pm    Post subject: Reply with quote

Is there a reason you are trying to build glibc-2.6.1 (which is very old at this point)? The error you might be facing is because it won't compile with more modern versions of gcc, etc.
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Mon Apr 05, 2010 4:50 pm    Post subject: Reply with quote

Oops, missed that, thanks mikegpitt. :)

Just post your emerge --info then.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Mon Apr 05, 2010 4:52 pm    Post subject: Reply with quote

Downgrading glibc will kill your system. Better tell us what are you trying to achieve?
Back to top
View user's profile Send private message
Thomas8
n00b
n00b


Joined: 05 Apr 2010
Posts: 4

PostPosted: Mon Apr 05, 2010 5:37 pm    Post subject: Reply with quote

Hello,

here is my emerge --info:
Code:

Portage 2.1.7.16 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r6 i686)
=================================================================
System uname: Linux-2.6.31-gentoo-r6-i686-Intel-R-_Core-TM-2_Duo_CPU_T7250_@_2.00GHz-with-gentoo-1.12.13
Timestamp of tree: Sat, 20 Mar 2010 10:45:02 +0000
app-shells/bash:     4.0_p35
dev-lang/python:     2.6.4
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-o2 -d_fortify_source=2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-o2 -d_fortify_source=2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.ovh.net/gentoo-distfiles/ ftp://mirrors.ipv6.linuxant.fr/distfiles.gentoo.org/ http://mirrors.ipv6.linuxant.fr/distfiles.gentoo.org/ ftp://mirrors.linuxant.fr/distfiles.gentoo.org/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ http://ftp.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo "
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo fam firefox flac fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 jpeg kde ldap libnotify mad mikmod mng modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support qt4 quicktime readline reflection sdl session spell spl ssl startup-notification svg sysfs tcpd thunar tiff truetype unicode usb vorbis win32codecs x264 x86 xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ens1371" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vmware vesa vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


But when i've done the 'emerge --info', I had to remove an option behind the cflags. I had previously:
Code:

CFLAGS="-o2 -d_fortify_source=2 -march=i686 -pipe" ../glibc-2.6.1/configure --prefix=/usr


Jaglover wrote:
Downgrading glibc will kill your system. Better tell us what are you trying to achieve?


I don't try to downgrading glibc, I'm trying to create a minimal system based on gentoo, so I downloaded the kernel, etc., and so I have to compile glibc to put on my new system. The idea is to create uen gentoo bootable image on a USB key.
To create this, I previously installed the latest gentoo in order to use the compiler, fdisk, etc..

Thank you for your help
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9527
Location: beyond the rim

PostPosted: Mon Apr 05, 2010 7:51 pm    Post subject: Reply with quote

Thomas8 wrote:
But when i've done the 'emerge --info', I had to remove an option behind the cflags. I had previously:
Code:

CFLAGS="-o2 -d_fortify_source=2 -march=i686 -pipe" ../glibc-2.6.1/configure --prefix=/usr

That's -O2 (uppercase o), -o2 is something completely different that you don't want in your CFLAGS. And what did you try to accomplish with the configure command in make.conf?
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Mon Apr 05, 2010 8:02 pm    Post subject: Reply with quote

Thomas8 wrote:
I don't try to downgrading glibc, I'm trying to create a minimal system based on gentoo, so I downloaded the kernel, etc., and so I have to compile glibc to put on my new system. The idea is to create uen gentoo bootable image on a USB key.
To create this, I previously installed the latest gentoo in order to use the compiler, fdisk, etc..
So basically you installed a Gentoo system, and you are trying to build a minimal environment inside a chroot jail, correct? I'm still not exactly sure why you would be using an old version of glibc instead of using all the latest stable packages. I apologize for not answering your question, but I think it's a good idea to first ensure you are trying to build your environment in the most sane way possible.
Back to top
View user's profile Send private message
Thomas8
n00b
n00b


Joined: 05 Apr 2010
Posts: 4

PostPosted: Tue Apr 06, 2010 2:27 pm    Post subject: Reply with quote

Genone wrote:
Thomas8 wrote:
But when i've done the 'emerge --info', I had to remove an option behind the cflags. I had previously:
Code:

CFLAGS="-o2 -d_fortify_source=2 -march=i686 -pipe" ../glibc-2.6.1/configure --prefix=/usr

That's -O2 (uppercase o), -o2 is something completely different that you don't want in your CFLAGS. And what did you try to accomplish with the configure command in make.conf?


I will try with an upper O. To be honest, I do not understand why I have to put ' ../glibc-2.6.1/configure --prefix=/usr ' behind the CFLAGS, but it was recommended to me by the teacher. I searched and I realized that the file which I referred, I must call previously with this option before typing the command 'make'

mikegpitt wrote:


Thomas8 wrote:

I don't try to downgrading glibc, I'm trying to create a minimal system based on gentoo, so I downloaded the kernel, etc., and so I have to compile glibc to put on my new system. The idea is to create uen gentoo bootable image on a USB key.
To create this, I previously installed the latest gentoo in order to use the compiler, fdisk, etc..

So basically you installed a Gentoo system, and you are trying to build a minimal environment inside a chroot jail, correct? I'm still not exactly sure why you would be using an old version of glibc instead of using all the latest stable packages. I apologize for not answering your question, but I think it's a good idea to first ensure you are trying to build your environment in the most sane way possible.


The version of glibc was given to me by Professor
Back to top
View user's profile Send private message
hielvc
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2805
Location: Oceanside, Ca

PostPosted: Tue Apr 06, 2010 3:01 pm    Post subject: Reply with quote

What your trying to do is use gentoo to build a "Linux From Scratch" system. For info "emerge linuxfromscratch" which is the bible for doing something like this.
_________________
An A-Z Index of the Linux BASH command line
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Tue Apr 06, 2010 3:27 pm    Post subject: Reply with quote

Thomas8 wrote:
I do not understand why I have to put ' ../glibc-2.6.1/configure --prefix=/usr ' behind the CFLAGS, but it was recommended to me by the teacher.
You are right... this is nonsense. If you want to run configure options on a package, the proper place to do this is inside the ebuild. From the look of where glibc installs it assumes the prefix /usr by default.

Now that you mention that a professor wants you to do this everything makes sense... professors never know what they are doing :lol:

Without understanding more about your project I don't understand why you are doing things the way you are, but I'm guessing that your prof gave you an older snapshot of a bunch of packages which would be compatible with each other... is that true? If not, I would ask your professor if you need to do things with his exact packages, or if you can just move to their modern equivalents. The latter option will give you less headaches, but might defeat the purpose of your project.
Back to top
View user's profile Send private message
Thomas8
n00b
n00b


Joined: 05 Apr 2010
Posts: 4

PostPosted: Tue Apr 06, 2010 4:02 pm    Post subject: Reply with quote

I find on a french web site (http://www.fr.linuxfromscratch.org/view/clfs-1.1-fr/x86_64-64/final-system/glibc.html)
equivalent parameters for CFLAGS ...
Code:

CFLAGS="-mtune=generic -g -O2" \
    ../glibc-2.7/configure --prefix=/usr \
    --disable-profile --enable-add-ons --enable-kernel=2.6.0 \
    --libexecdir=/usr/lib/glibc --libdir=/usr/lib

The problem is that the author of the tutorial does not seem reachable .... Can you watch?

In advance thank you

Thomas
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Tue Apr 06, 2010 8:00 pm    Post subject: Reply with quote

Thomas8 wrote:

I will try with an upper O. To be honest, I do not understand why I have to put ' ../glibc-2.6.1/configure --prefix=/usr ' behind the CFLAGS, but it was recommended to me by the teacher.


Your post should goes to unsupport software as it's about linuxfromscratch and not installing gentoo.

What you've done wrong is that they told you

Quote:
CFLAGS="-mtune=generic -g -O2" \
../glibc-2.7/configure --prefix=/usr \
--disable-profile --enable-add-ons --enable-kernel=2.6.0 \
--libexecdir=/usr/lib/glibc --libdir=/usr/lib

The \ are there because for long lines to type, you just end the line with \ and keep writing your long line and last time you will hit the enter key without an ending \ the whole line will be taken as
Code:

echo this \
is a stupid \
example

you should type it as : echo this \[return key push] is a stupid \[return key push]example[return key push]
and gave you result :
Code:
this is a stupid example

If you understood it, it's exactly the same as "echo this is a stupid example" but easier to read if you have a real long line to show or type

So that command is not to set your CFLAGS as-is, but it's one to be type & execute.
The purpose is to run the configure script of your glibc (the ../glibc-2.7/configure program) while CFLAGS is set to some values so the program will run with that CFLAGS in its context.
As example check your cflags value if you type that
Code:
CFLAGS="this is a stupid example" emerge --info

as you'll see CFLAGS will be report as "this is a stupid example" but if you rerun "emerge --info" you'll see your cflags will be normal (well, as it should in its normal context)

Same for the parameters pass to glibc configure (--prefix=/usr)... for linuxfromscratch point of view i suppose their tools aren't yet in /usr to build the distro, so it's necessary to told the configure script where the final product should goes.

If you want to do like them you need to download the glibc version source file and unpack it by hands and follow what they said, but you can't emerge glibc like that.
You might just emerge -f glibcverisonyouwish" to ask gentoo to download the source file and pickup the file from your distfiles directory.

But as you seems really to lack knowledge for doing something like that, i suggest you 1/ use a linuxfromscratch and follow their instructions blindly or 2/ gave up and explain your teacher you shouldn't sleep in class or 3/ if you want cross compling with gentoo that doc might help http://www.gentoo.org/doc/en/cross-compiling-distcc.xml (it's about cross compilation in gentoo WITH DISTCC, but you'll find the info about crossdev tools and howto build a glibc for another arch) or just emerge crossdev and read the doc or google for it
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2284
Location: Adendorf, Germany

PostPosted: Wed Apr 07, 2010 8:20 am    Post subject: Reply with quote

krinn wrote:
Same for the parameters pass to glibc configure (--prefix=/usr)... for linuxfromscratch point of view i suppose their tools aren't yet in /usr to build the distro, so it's necessary to told the configure script where the final product should goes.
I don't know for glibc, but every package I have ever had the unfortune to be forced to compile manually, defaulted to "/usr/local" as the prefix, so normal users are able to install a local system without being root. (If the system administrator allowed them to install into /usr/local of course.)
So from that point prefixing to /usr surely makes sense.
_________________
Important German:
  1. "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
  2. "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum