glibc-2.1.1 and egcs-1.1.2

glibc-2.1.1 and egcs-1.1.2

Post by Pete » Sun, 11 Jul 1999 04:00:00



  Just installed Slackware 4.0 and want to put some glibc progs on
there. Love slack, but it needs to be glibc based. Anyway, I started
with gcc 2.7.?.? and compiled and installed egcs-1.1.2. Worked great,
gcc -v returns "gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)".
Next, I compiled and installed glibc-2.1.1 with crypt, linuxthreads, and
localedata. I installed it to /usr/local so I didn't break libc5 right
away. Next, I changed the specs file, changing ld-linux.so.1 to
ld-linux.so.2 and removing two references to -lgmon under the *lib:
section. I was able to compile and run a test program just fine and it
linked to libc.so.6 which is a link to libc-2.1.1.so like it should be.
Now, I get the same error when I have the glibc2 libs in /usr/local/lib
as I do when I tar that directory up and move it to /lib. Here is the
error I get
/lib/crt1.o(.text+0x1d): undefined reference to '__libc_start_main'
../lib/libncurses.so: undefined reference to '__strdup'
make[1]: *** [tic] Error1
make[1]: Leaving directory '/root/ncurses-5.0-990626/progs'
make: *** [all] Error2

Anyone know what it is linking against, why, and most importantly, how I
can change it?

--
Peter Buelow
**
"Becoming a Slack expert so I can permanently
walk outside and see the world without windows!"
**

 
 
 

glibc-2.1.1 and egcs-1.1.2

Post by Coope » Mon, 12 Jul 1999 04:00:00



>   Just installed Slackware 4.0 and want to put some glibc progs on
> there. Love slack, but it needs to be glibc based. Anyway, I started
> with gcc 2.7.?.? and compiled and installed egcs-1.1.2. Worked great,
> gcc -v returns "gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)".
> Next, I compiled and installed glibc-2.1.1 with crypt, linuxthreads, and
> localedata. I installed it to /usr/local so I didn't break libc5 right
> away. Next, I changed the specs file, changing ld-linux.so.1 to
> ld-linux.so.2 and removing two references to -lgmon under the *lib:
> section. I was able to compile and run a test program just fine and it
> linked to libc.so.6 which is a link to libc-2.1.1.so like it should be.
> Now, I get the same error when I have the glibc2 libs in /usr/local/lib
> as I do when I tar that directory up and move it to /lib. Here is the
> error I get
> /lib/crt1.o(.text+0x1d): undefined reference to '__libc_start_main'
> ../lib/libncurses.so: undefined reference to '__strdup'
> make[1]: *** [tic] Error1
> make[1]: Leaving directory '/root/ncurses-5.0-990626/progs'
> make: *** [all] Error2

> Anyone know what it is linking against, why, and most importantly, how I
> can change it?

The only time I got an error like that was when I was compiling software
that didn't have a main function in it.
Try these in the dir with the sources and see if something comes up. If
not, you've found your problem.
grep " main(" *.c
grep " main " *.c

If the stuff you're compiling isn't supposed to form the eventual
executable yet, the thing is forgetting to include the "-c" parameter to
gcc when compiling the sources. That parameter says compile, but don't
link yet.

Cooper
--
Linux: Proof of intelligent life on earth

 
 
 

glibc-2.1.1 and egcs-1.1.2

Post by Frederick W. Reimer, Sr » Mon, 12 Jul 1999 04:00:00



>   Just installed Slackware 4.0 and want to put some glibc progs on
> there. Love slack, but it needs to be glibc based. Anyway, I started
> with gcc 2.7.?.? and compiled and installed egcs-1.1.2. Worked great,
> gcc -v returns "gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)".
> Next, I compiled and installed glibc-2.1.1 with crypt, linuxthreads, and
> localedata. I installed it to /usr/local so I didn't break libc5 right
> away. Next, I changed the specs file, changing ld-linux.so.1 to
> ld-linux.so.2 and removing two references to -lgmon under the *lib:
> section. I was able to compile and run a test program just fine and it
> linked to libc.so.6 which is a link to libc-2.1.1.so like it should be.
> Now, I get the same error when I have the glibc2 libs in /usr/local/lib
> as I do when I tar that directory up and move it to /lib. Here is the
> error I get
> /lib/crt1.o(.text+0x1d): undefined reference to '__libc_start_main'
> ../lib/libncurses.so: undefined reference to '__strdup'
> make[1]: *** [tic] Error1
> make[1]: Leaving directory '/root/ncurses-5.0-990626/progs'
> make: *** [all] Error2

> Anyone know what it is linking against, why, and most importantly, how I
> can change it?

> --
> Peter Buelow
> **
> "Becoming a Slack expert so I can permanently
> walk outside and see the world without windows!"
> **

Ooh, this is tricky.  I'm not going to suggest that you should reinstall
over your "normal" libraries, but you may have to do that in order to get
it to work.

crt1.o is the startup code (before your main is invoked) that parses the
command line, gets the library ready, and sets up argv and argc before
calling your main proceedure.  It's usually stored in the "gcc library"
directory, in my case
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/crtbegin.o.  This is static
code that gets linked to your objects to create the final executable (that
is dynamically linked to libc.so.6).  Because this is stored in the
compiler directory, you may need to reinstall with the "real" default
directories instead of /usr/local.  Either that OR, did you notice a
/usr/local/lib/gcc-lib directory?  If so, you may need to copy this over.

Do whatever you think is best.  I only reinstalled glibc twice, and it was
a while back, so I can't give you specific advice.

HTH,

Fred

 
 
 

glibc-2.1.1 and egcs-1.1.2

Post by Thomas T. Veldhous » Sat, 17 Jul 1999 04:00:00


You can't link a program against glibc2 and ncurses if ncurses itself links
to libc5.  You should have untarred ncurses in your glibc2.1.1 source
directory and then renamed it to ncurses (from ncurses-4.2).  Then enable
its compilation as an add-on.  Also, there is no localedata for glibc-2.1.1,
it is included in the source tarball.  How were you able to enable it?  It
should already be there.

By the way, you are going to have the same proble with all libraries not
linked against glibc-2.1.1, such as all the X libraries, etc.  You should
rebuild everything against it, except for the fact that you installed on
/usr/local, in which case you better not recompile anything that the system
depends upon at boot time (unless /usr/local is on the same partition as /).

Tom Veldhouse


>  Just installed Slackware 4.0 and want to put some glibc progs on
>there. Love slack, but it needs to be glibc based. Anyway, I started
>with gcc 2.7.?.? and compiled and installed egcs-1.1.2. Worked great,
>gcc -v returns "gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)".
>Next, I compiled and installed glibc-2.1.1 with crypt, linuxthreads, and
>localedata. I installed it to /usr/local so I didn't break libc5 right
>away. Next, I changed the specs file, changing ld-linux.so.1 to
>ld-linux.so.2 and removing two references to -lgmon under the *lib:
>section. I was able to compile and run a test program just fine and it
>linked to libc.so.6 which is a link to libc-2.1.1.so like it should be.
>Now, I get the same error when I have the glibc2 libs in /usr/local/lib
>as I do when I tar that directory up and move it to /lib. Here is the
>error I get
>/lib/crt1.o(.text+0x1d): undefined reference to '__libc_start_main'
>../lib/libncurses.so: undefined reference to '__strdup'
>make[1]: *** [tic] Error1
>make[1]: Leaving directory '/root/ncurses-5.0-990626/progs'
>make: *** [all] Error2

>Anyone know what it is linking against, why, and most importantly, how I
>can change it?

>--
>Peter Buelow
>**
>"Becoming a Slack expert so I can permanently
>walk outside and see the world without windows!"
>**

 
 
 

glibc-2.1.1 and egcs-1.1.2

Post by A Guy Called Tyket » Sat, 17 Jul 1999 04:00:00


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Quote:> You can't link a program against glibc2 and ncurses if ncurses itself links
> to libc5.  You should have untarred ncurses in your glibc2.1.1 source
> directory and then renamed it to ncurses (from ncurses-4.2).  Then enable
> its compilation as an add-on.  Also, there is no localedata for glibc-2.1.1,
> it is included in the source tarball.  How were you able to enable it?  It
> should already be there.

        Hmm....

        Why would you need to compile ncurses as an ADDON to glibc? That's
just plain stupid. Ncurses (or any curses library), is best compiled and
installed from scratch, adn separate from glibc-2.1.1. If what you're
saying is the case, then why wouldn't ncurses be included in the glibc
dist? You can compile ncurses by itself, after glibc-2.1.1 has been
compiled and installed, and link programs against ncurses, that is
commpiled with glibc. Either way it goes, you'd need to recompile the
program that's using the ncurses library, linked to libc5.

                                                        BL.
- --


WebMaster, NewsMaster.. Smeghead! :)    |   http://www.omnilinx.net/~tyketto
    PGP: 1024/E9DF4D85 67 6B 33 D0 B9 95 F4 37  4B D1 CE BD 48 B0 06 93

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE3jzntyBkZmuMZ8L8RAssEAJ9lATj4NOp9XRr2weojqFA54IKUGQCgj5T0
OkrLozMD9UlX86yyLMBwiNQ=
=FayE
-----END PGP SIGNATURE-----