LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Compiling glibc using slackbuild (https://www.linuxquestions.org/questions/slackware-14/compiling-glibc-using-slackbuild-835822/)

alekow 10-02-2010 12:24 PM

Compiling glibc using slackbuild
 
Hi!

Im trying to recompile glibc from a working slackware-current system using source from a slackware mirror. I'm doing it for testing purpose only. Never done that before, so i'm not sure if i'm doing it right. I get the following error:
Code:

make[2]: Entering directory `/glibc-tmp-a44be92860d34519b0c9a4500878e2e6/glibc-2.11.1/iconvdata'
../Makeconfig:85: ../i486/config.make: No such file or directory
/bin/sh: line 0: cd: ../i486: No such file or directory
The GNU C library has not been configured.
Run `configure' to configure it before building.
Try `configure --help' for more details.
make[2]: *** No rule to make target `../i486/config.status', needed by `../i486/config.make'.  Stop.
make[2]: Leaving directory `/glibc-tmp-a44be92860d34519b0c9a4500878e2e6/glibc-2.11.1/iconvdata'
make[1]: *** [iconvdata/subdir_lib] Error 2
make[1]: Leaving directory `/glibc-tmp-a44be92860d34519b0c9a4500878e2e6/glibc-2.11.1'
make: *** [all] Error 2
make -r PARALLELMFLAGS="" CVSOPTS="" -C .. objdir=`pwd` all
make[1]: Entering directory `/glibc-tmp-a44be92860d34519b0c9a4500878e2e6/glibc-2.11.1'
make  subdir=csu -C csu ..=../ subdir_lib
make[2]: Entering directory `/glibc-tmp-a44be92860d34519b0c9a4500878e2e6/glibc-2.11.1/csu'
make[2]: Leaving directory `/glibc-tmp-a44be92860d34519b0c9a4500878e2e6/glibc-2.11.1/csu'
make[2]: Entering directory `/glibc-tmp-a44be92860d34519b0c9a4500878e2e6/glibc-2.11.1/csu'
../Makeconfig:85: ../i486/config.make: No such file or directory
/bin/sh: line 0: cd: ../i486: No such file or directory
The GNU C library has not been configured.
Run `configure' to configure it before building.
Try `configure --help' for more details.
make[2]: *** No rule to make target `../i486/config.status', needed by `../i486/config.make'.  Stop.
make[2]: Leaving directory `/glibc-tmp-a44be92860d34519b0c9a4500878e2e6/glibc-2.11.1/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/glibc-tmp-a44be92860d34519b0c9a4500878e2e6/glibc-2.11.1'
make: *** [all] Error 2

Can anyone tell me what am I doing wrong?

Thanks in advance.

GrapefruiTgirl 10-02-2010 12:31 PM

Did you run ./configure before running `make`?

I suggest examining the SlackBuild script from the CD or DVD or from a mirror, and look at the options given to the configure script first too, so you end up with a working glibc that's properly configured for Slackware.

Also note that using the `configure` + `make` + `make install` method will not produce a Slackware package, AND it will (if done as root especially) overwrite some or all of your working glibc on your system, unless you're safely inside a chrooted build environment, so you very likely DO NOT want to run `make install`. For learning purposes, run `configure` and `make` only.

Please have a look at the SlackBuild script - that will learn you some stuff you will want to know.

EDIT - I see (upon opening my eyes and re-reading!) your thread title says "..slackbuild.." so maybe showing us the exact sequence of commands you're running before this happens, will indicate something wrong. It appears that a SlackBuild script is not being used here.

alekow 10-02-2010 02:01 PM

Quote:

It appears that a SlackBuild script is not being used here.
It IS being used.
Quote:

maybe showing us the exact sequence of commands you're running before this happens
Code:

# ./glibc.SlackBuild
Or to be completely exact:
Code:

LC_ALL=C LANG=C ./glibc.SlackBuild
just to produce english output, because i use localized system.
Quote:

Please have a look at the SlackBuild script - that will learn you some stuff you will want to know.
Well, I do want to learn, so i looked there to before running it :-)

BrZ 10-03-2010 12:59 PM

???
Quote:

../Makeconfig:85: ../i486/config.make: No such file or directory
/bin/sh: line 0: cd: ../i486: No such file or directory
The GNU C library has not been configured.
Run `configure' to configure it before building.

alekow 10-03-2010 01:20 PM

Well, i'm surprised too, because configure is definitely being run by the slackbuild script! Any ideas? I've found only one similar error - on gentoo bugzilla, here's a link:

http://bugs.gentoo.org/86771

But it doesn't help me at all.

If someone using slackware-current or slackware-13.1 simply ran glibc slackbuild, and than report what happenned - it could be of some use to me.

Thanks for your replies.

BrZ 10-03-2010 01:30 PM

current64, gcc-4.4.5: http://pastebin.com/ib58YxdN

Edit: That was for gcc. Sorry...

alekow 10-03-2010 04:02 PM

So, could you try with glibc and see if it creates a package? It did compile for me for some time... The error occured while compiling iconvdata, which is not the first part of code.

BrZ 10-03-2010 04:14 PM

1 Attachment(s)
Sorry friend,gcc is still going, but I can confirm that glibc-2.12.1 built fine here...

alekow 10-04-2010 12:15 AM

Well, that's... good. Anyone with 32-bit? Maybe current?

Squall90 10-04-2010 10:05 AM

Using the glibc.SlackBuild from the Slackware 13.1 (32bit) DVD I created glibc-2.11.1-i486 with GCC 4.4.4.
Now what?^^

GrapefruiTgirl 10-04-2010 10:49 AM

Depends. :)

If you wished to install it, do:
Code:

installpkg <package-name-you-just-made>
HOWEVER: You already have this package installed, so theoretically, you would want to upgrade the package. Notice the % sign in the middle. Format is: upgradepkg oldpkg%newpkg
Code:

upgradepkg glibc%</path/to/your/new/package>
HOWEVER #TWO: Again, you already have this installed, so theoretically you don't really want to install this anyhow.. If there's anything wrong with your new package, then installing it might bork your system.


But, for learning purposes, if that's what this is, then use `installpkg` or `upgradepkg` and see what happens. :)

Squall90 10-04-2010 01:51 PM

@GrapefruiTgirl thanks for you answer, but I just build it because alekow wanted someone to do so. (And I wanted to try out my new CPU.) ^^

alekow 10-04-2010 01:54 PM

Quote:

Using the glibc.SlackBuild from the Slackware 13.1 (32bit) DVD I created glibc-2.11.1-i486 with GCC 4.4.4.
Now what?^^
Then I guess something must be wrong with my slackware source tree, or i don't know... Tried compiling it on slackware-current and a clean installation of 13.1 with the same result... I'll re-download the source and try one more time ;-)
________________________
EDIT:

Nope, exactly the same error, so it's not it. A hardware problem maybe??? It get's boring...

GrapefruiTgirl 10-04-2010 01:55 PM

Oops! I thought I was replying to the OP! Sorry folks for the confusion! :p

Squall90 10-04-2010 02:37 PM

Quote:

Originally Posted by alekow (Post 4117502)
Nope, exactly the same error, so it's not it. A hardware problem maybe??? It get's boring...

And you have a full installation? This is really weird.
Which user do you use when you run SlackBuilds?

alekow 10-04-2010 03:19 PM

Root of course. I'll check if it's not a problem with the mirror i used to download slackware tree...

GrapefruiTgirl 10-04-2010 03:21 PM

Are you using the md5 checksums and/or the gpg key to verify the archives and scripts you download? That would eliminate any suspicion about the packages being bad.

alekow 10-04-2010 04:30 PM

I use rsync with -avcz switches to download slackware tree and keep it up to date. So i think (am I wrong?) that "c" switch should make rsync verify the checksums. Anyway - I plan to download an iso image of the installation disk, and try a test install.

GrapefruiTgirl 10-04-2010 04:34 PM

Sounds good. But do use the md5sum on the ISO image too, to make sure you downloaded it error-free; this is also recommended for the burned disc too - to make sure it burned OK. If there's one bit error with it, you can get really weird problems when trying to install. Burn it at a low speed like x2 or x4.

Oh, P.S. - as I understand it (from the man page of rsync), no the -c option of rsync does not check the checksum of the file to make sure it's not been altered; it only checks whether or not you need to download the file because it's been changed since you last downloaded it. Whatever (reliable source) you download Slackware packages from, there will be either individual .asc files or .md5 files, or a large text file containing checksums for a large number of files. Each and every file available for download, will have a md5sum or .asc file that goes along with it. It's those checksums that we're talking about.

alekow 10-04-2010 05:47 PM

Quote:

Oh, P.S. - as I understand it (from the man page of rsync), no the -c option of rsync does not check the checksum of the file to make sure it's not been altered
As I understand it rsync first checks sizes of files -----> if their sizes differ it re-downloads them
-----> if not it checks the checksums -----> if checksums differ it re-downloads the file
-----> if they are the same, leaves the file untouched

Anyway - I checked them manually, and they were OK. There was one (unsignificant I think) file in source tree missing - a dot file in lzo source, which doesn't appear even on ftp.slackware.com mirror.

Squall90 10-05-2010 12:50 AM

Currently I cannot check my theory myself but shouldn't the build directory be in /tmp? If you see the error message it gives an absolute path to the root directory but not to the tmp directory.
Quote:

make[2]: Entering directory `/glibc-tmp-a44be92860d34519b0c9a4500878e2e6/glibc-2.11.1/iconvdata'
I mean, could it be, that the directory is in /tmp but the SlackBuild tries to access (or find) it in the root directory?
Otherwise I have no idea what could be wrong.

alekow 10-05-2010 03:37 AM

No, no - if you built the package you should have a directory like this in your root directory. The slackbuild made it ;-)
Code:

# Temporary build location.  This should not be a directory                       
# path a non-root user could create later...                                     
TMP=${TMP:-/glibc-tmp-$(mcookie)}                                                 
mkdir -p $TMP

However I should have checked the number and i didn't.

EDIT:
The number is correct, so i don't know what to do. I guess that either I do something wrong, or it is hardware problem.

And you just simply ran the slackbuild? Didn't you make anything else? Any modifications? Aren't there any prerequisites for compiling glibc that i don't know? It may be something stupid...

Squall90 10-05-2010 10:17 AM

I run it this way:
Code:

# ARCH=i486 ./glibc.SlackBuild
because I set ARCH in /etc/profile to i686 and glibc does not seem to support it. Only i486 and x86_64 and I didn't want to alter it. ^^

alekow 10-05-2010 02:28 PM

Problem solved for me. I found out that my slackware-13.1 tree was broken. I simply forgot to add --delete-after flag to rsync after switching from slackware-current. This resulted in mixed current/13.1 tree. The effect was, that my "13.1" installation in fact became slackware-current.
I still don't know why I can't compile glibc on current, but now I don't need to know :-)

Thank's for helping me solving this!

BrZ 10-08-2010 09:56 AM

just today i had time to try again glibc and it came with something like your error. It was make-3.8.2. Found this patch http://permalink.gmane.org/gmane.com...dded.scm/39275
Quote:

---
diff --git a/manual/Makefile b/manual/Makefile
index c5866eb..b1f5fa7 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -232,7 +232,10 @@ ifdef objpfx
.PHONY: stubs
stubs: $(objpfx)stubs
endif
-$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
+$(objpfx)stubs ../po/manual.pot:
+ $(make-target-directory)
+ touch $@
+$(objpfx)stamp%:
$(make-target-directory)
touch $@

--
1.7.2
it is still building, but passed teh error part.

BrZ 10-08-2010 10:55 AM

too soon...

run the patch, continued building inside /glibc-2.12.1/build-glibc-2.12.1/ and it compiled... my bad.

when called by script (with and without that patch)...

Quote:

mv -f /glibc-tmp-58dd5b4a0ace409e4e425423ca60139d/glibc-2.12.1/build-glibc-2.12.1/iconvdata/iconv-rules.new /glibc-tmp-58dd5b4a0ace409e4e425423ca60139d/glibc-2.12.1/build-glibc-2.12.1/iconvdata/iconv-rules
make[2]: Saindo do diretório `/glibc-tmp-58dd5b4a0ace409e4e425423ca60139d/glibc-2.12.1/iconvdata'
make[2]: Entrando no diretório `/glibc-tmp-58dd5b4a0ace409e4e425423ca60139d/glibc-2.12.1/iconvdata'
../Makeconfig:85: ../x86_64/config.make: Arquivo ou diretório não encontrado
/bin/sh: line 0: cd: ../x86_64: Arquivo ou diretório não encontrado
The GNU C library has not been configured.
Run `configure' to configure it before building.
Try `configure --help' for more details.
make[2]: *** Sem regra para processar o alvo `../x86_64/config.status', necessário por `../x86_64/config.make'. Pare.
make[2]: Saindo do diretório `/glibc-tmp-58dd5b4a0ace409e4e425423ca60139d/glibc-2.12.1/iconvdata'
make[1]: ** [iconvdata/subdir_lib] Erro 2
make[1]: Saindo do diretório `/glibc-tmp-58dd5b4a0ace409e4e425423ca60139d/glibc-2.12.1'
make: ** [all] Erro 2
make -r PARALLELMFLAGS="" CVSOPTS="" -C .. objdir=`pwd` all
make[1]: Entrando no diretório `/glibc-tmp-58dd5b4a0ace409e4e425423ca60139d/glibc-2.12.1'
make subdir=csu -C csu ..=../ subdir_lib
make[2]: Entrando no diretório `/glibc-tmp-58dd5b4a0ace409e4e425423ca60139d/glibc-2.12.1/csu'
make[2]: Saindo do diretório `/glibc-tmp-58dd5b4a0ace409e4e425423ca60139d/glibc-2.12.1/csu'
make[2]: Entrando no diretório `/glibc-tmp-58dd5b4a0ace409e4e425423ca60139d/glibc-2.12.1/csu'
../Makeconfig:85: ../x86_64/config.make: Arquivo ou diretório não encontrado
/bin/sh: line 0: cd: ../x86_64: Arquivo ou diretório não encontrado
The GNU C library has not been configured.
Run `configure' to configure it before building.
Try `configure --help' for more details.
make[2]: *** Sem regra para processar o alvo `../x86_64/config.status', necessário por `../x86_64/config.make'. Pare.
make[2]: Saindo do diretório `/glibc-tmp-58dd5b4a0ace409e4e425423ca60139d/glibc-2.12.1/csu'
make[1]: ** [csu/subdir_lib] Erro 2
make[1]: Saindo do diretório `/glibc-tmp-58dd5b4a0ace409e4e425423ca60139d/glibc-2.12.1'
make: ** [all] Erro 2
feck =[

BrZ 10-08-2010 05:41 PM

sorry spamming this way, but I was tricked by the error as the package was built before. it seems to call some files that are inside ".../glibc-2.12.1/build-glibc-2.12.1/", but looking at them inside "/glibc-2.12.1/x86_64/" like 'config.make':

../Makeconfig:85: ../x86_64/config.make: Arquivo ou diretório não encontrado

Makeconfig
84 # Get the values defined by options to `configure'.
85 include $(common-objpfx)config.make

edit: built =]
found this inside Makeconfig:
# If config.make exists, the source directory was configured,
# so don't try to be clever and find another directory to build in.

in the end, the solution was to compile it without the "target" dir. this script (from Slackware) worked here.

ps: I added the patch to 'make-3.82' and my flags are to x86_64 without multilib. sorry all this mess...
ps2: pump your numjobs (NUMJOBS=${NUMJOBS:--j2}) if needed. good luck.

Holering 10-18-2010 05:24 PM

Could you please post exactly what you did to fix your problems?

I'm having a very similar issue if not, the same thing. Also the reason I'm recompiling glibc is because I'm changing my host cpu from i486 to pentium4 (my cpu is actually a prescott cpu but prescott isn't a valid identifier so...)

So I compiled my first pass of glibc 2.12.1 successfully with the make version patch for newer versions of make and also after omitting the $TARGET-slackware-linux option under ./configure. Ran the slackbuild with no problems, then installed glibc with gcc 4.5.1. So first pass was successfull but I had to omit $TARGET-slackware-linux.

So I went through my second pass of binutils and installed, second stage 3 pass of gcc, installed gcc, but my second pass of glibc is just giving me hell about the chost and it looks just like your very last problem you had after the make version patch. It's either configure or make causing this issue but I didn't understand how you fixed that very last part.

This is what I get :

../Makeconfig:85: ../pentium4/config.make: No such file or directory
/bin/sh: line 0: cd: ../pentium4: No such file or directory
The GNU C library has not been configured.
Run `configure' to configure it before building.
Try `configure --help' for more details.
make[2]: *** No rule to make target `../pentium4/config.status', needed by `../pentium4/config.make'. Stop.
make[2]: Leaving directory `/glibc-tmp-397c89eb601b863a64d78fd789c4ecb9/glibc-2.12.1/iconvdata'
make[1]: *** [iconvdata/subdir_lib] Error 2
make[1]: Leaving directory `/glibc-tmp-397c89eb601b863a64d78fd789c4ecb9/glibc-2.12.1'
make: *** [all] Error 2
make -r PARALLELMFLAGS="" CVSOPTS="" -C .. objdir=`pwd` all
make[1]: Entering directory `/glibc-tmp-397c89eb601b863a64d78fd789c4ecb9/glibc-2.12.1'
make subdir=csu -C csu ..=../ subdir_lib
make[2]: Entering directory `/glibc-tmp-397c89eb601b863a64d78fd789c4ecb9/glibc-2.12.1/csu'
make[2]: Leaving directory `/glibc-tmp-397c89eb601b863a64d78fd789c4ecb9/glibc-2.12.1/csu'
make[2]: Entering directory `/glibc-tmp-397c89eb601b863a64d78fd789c4ecb9/glibc-2.12.1/csu'
../Makeconfig:85: ../pentium4/config.make: No such file or directory
/bin/sh: line 0: cd: ../pentium4: No such file or directory
The GNU C library has not been configured.
Run `configure' to configure it before building.
Try `configure --help' for more details.
make[2]: *** No rule to make target `../pentium4/config.status', needed by `../pentium4/config.make'. Stop.
make[2]: Leaving directory `/glibc-tmp-397c89eb601b863a64d78fd789c4ecb9/glibc-2.12.1/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/glibc-tmp-397c89eb601b863a64d78fd789c4ecb9/glibc-2.12.1'
make: *** [all] Error 2

When Glibc had this problem in the first pass. I took out the $TARGET-slackware-linux line under ./configure (in the slackbuild) and it went fine (not that I wanted to do that but oh well). Now it just doesn't care and it keeps on giving me this error no matter what! I've also used --build=pentium4-slackware-linux and --host=pentium4-slackware-linux. I've combined both or all 3 options in different combinations and it just doesn't wanna do the second pass.

BrZ 10-18-2010 06:19 PM

I think the safe way is to look here.

Holering 10-18-2010 07:27 PM

Nevermind just successfully built glibc with new host! It was a simple fix (or add on). Just had to add line | ln -s build-glibc-$VERSION $ARCH | right before | cd build-glibc-$VERSION || exit 1 | in the glibc.SlackBuild.

This should help the previous poster who had trouble with his chost and anyone else changing and/or building their slackware system from source code.

BrZ 10-19-2010 08:01 AM

Nice Holering, thanks for sharing.


All times are GMT -5. The time now is 08:06 AM.