public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: Different binary size
@ 2004-03-23 13:37 Lev Assinovsky
  2004-03-23 14:52 ` Admin-Stress
  0 siblings, 1 reply; 4+ messages in thread
From: Lev Assinovsky @ 2004-03-23 13:37 UTC (permalink / raw)
  To: Admin-Stress, gcc-help

You have to have libmysqlclient.so in /usr/lib/mysql

----
Lev Assinovsky
Aelita Software Corporation
O&S InTrust Framework Division, Team Leader
ICQ# 165072909


> -----Original Message-----
> From: Admin-Stress [mailto:meerkapot@yahoo.com]
> Sent: Tuesday, March 23, 2004 3:48 AM
> To: gcc-help@gcc.gnu.org
> Subject: Different binary size
> 
> 
> I compiled a program in two machines, both are using the same 
> gcc, MySQL library, and glibc (both
> are RedHat 9).
> 
> The first machine (MACHINE_1) produced 20 KB binary size, but 
> in second machine (MACHINE_2)
> produced 181 KB binary size.
> 
> I know that the problem is MACHINE_2 cant dynamically link 
> the libray. How can I fix this in
> MACHINE_2 so it can produce dynamic link? 
> 
> Here is my compile script :
> 
> gcc -o iaac iaac.c -I/usr/include/mysql -L/usr/lib/mysql 
> -lmysqlclient -lz
> 
> Please help me.
> 
> in MACHINE_1 :
> 
> $ ldd iaac
>         libmysqlclient.so.12 => /usr/lib/libmysqlclient.so.12 
> (0x4001c000)
>         libz.so.1 => /usr/lib/libz.so.1 (0x40052000)
>         libc.so.6 => /lib/libc.so.6 (0x40060000)
>         libcrypt.so.1 => /lib/libcrypt.so.1 (0x40187000)
>         libnsl.so.1 => /lib/libnsl.so.1 (0x401b3000)
>         libm.so.6 => /lib/libm.so.6 (0x401c7000)
>         libnss_files.so.2 => /lib/libnss_files.so.2 (0x401e8000)
>         libnss_dns.so.2 => /lib/libnss_dns.so.2 (0x401f3000)
>         libresolv.so.2 => /lib/libresolv.so.2 (0x401f7000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> 
> in MACHINE_2 :
> 
> $ ldd iaac
>         libz.so.1 => /usr/lib/libz.so.1 (0x4001d000)
>         libc.so.6 => /lib/i686/libc.so.6 (0x4002c000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on time.
> http://taxes.yahoo.com/filing.html
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Different binary size
  2004-03-23 13:37 Different binary size Lev Assinovsky
@ 2004-03-23 14:52 ` Admin-Stress
  0 siblings, 0 replies; 4+ messages in thread
From: Admin-Stress @ 2004-03-23 14:52 UTC (permalink / raw)
  To: gcc-help

Fixed. Thanks

--- Lev Assinovsky <LAssinovsky@algorithm.aelita.com> wrote:
> You have to have libmysqlclient.so in /usr/lib/mysql
> 
> ----
> Lev Assinovsky
> Aelita Software Corporation
> O&S InTrust Framework Division, Team Leader
> ICQ# 165072909
> 
> 
> > -----Original Message-----
> > From: Admin-Stress [mailto:meerkapot@yahoo.com]
> > Sent: Tuesday, March 23, 2004 3:48 AM
> > To: gcc-help@gcc.gnu.org
> > Subject: Different binary size
> > 
> > 
> > I compiled a program in two machines, both are using the same 
> > gcc, MySQL library, and glibc (both
> > are RedHat 9).
> > 
> > The first machine (MACHINE_1) produced 20 KB binary size, but 
> > in second machine (MACHINE_2)
> > produced 181 KB binary size.
> > 
> > I know that the problem is MACHINE_2 cant dynamically link 
> > the libray. How can I fix this in
> > MACHINE_2 so it can produce dynamic link? 
> > 
> > Here is my compile script :
> > 
> > gcc -o iaac iaac.c -I/usr/include/mysql -L/usr/lib/mysql 
> > -lmysqlclient -lz
> > 
> > Please help me.
> > 
> > in MACHINE_1 :
> > 
> > $ ldd iaac
> >         libmysqlclient.so.12 => /usr/lib/libmysqlclient.so.12 
> > (0x4001c000)
> >         libz.so.1 => /usr/lib/libz.so.1 (0x40052000)
> >         libc.so.6 => /lib/libc.so.6 (0x40060000)
> >         libcrypt.so.1 => /lib/libcrypt.so.1 (0x40187000)
> >         libnsl.so.1 => /lib/libnsl.so.1 (0x401b3000)
> >         libm.so.6 => /lib/libm.so.6 (0x401c7000)
> >         libnss_files.so.2 => /lib/libnss_files.so.2 (0x401e8000)
> >         libnss_dns.so.2 => /lib/libnss_dns.so.2 (0x401f3000)
> >         libresolv.so.2 => /lib/libresolv.so.2 (0x401f7000)
> >         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> > 
> > in MACHINE_2 :
> > 
> > $ ldd iaac
> >         libz.so.1 => /usr/lib/libz.so.1 (0x4001d000)
> >         libc.so.6 => /lib/i686/libc.so.6 (0x4002c000)
> >         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Finance Tax Center - File online. File on time.
> > http://taxes.yahoo.com/filing.html
> > 


__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Different binary size
  2004-03-23 10:12 Admin-Stress
@ 2004-03-23 13:02 ` llewelly
  0 siblings, 0 replies; 4+ messages in thread
From: llewelly @ 2004-03-23 13:02 UTC (permalink / raw)
  To: Admin-Stress; +Cc: gcc-help

Admin-Stress <meerkapot@yahoo.com> writes:

> I compiled a program in two machines, both are using the same gcc, MySQL library, and glibc (both
> are RedHat 9).
> 
> The first machine (MACHINE_1) produced 20 KB binary size, but in second machine (MACHINE_2)
> produced 181 KB binary size.
> 
> I know that the problem is MACHINE_2 cant dynamically link the libray. How can I fix this in
> MACHINE_2 so it can produce dynamic link? 
> 
> Here is my compile script :
> 
> gcc -o iaac iaac.c -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient -lz
> 
> Please help me.
> 
> in MACHINE_1 :
> 
> $ ldd iaac
>         libmysqlclient.so.12 => /usr/lib/libmysqlclient.so.12 (0x4001c000)
>         libz.so.1 => /usr/lib/libz.so.1 (0x40052000)
>         libc.so.6 => /lib/libc.so.6 (0x40060000)
>         libcrypt.so.1 => /lib/libcrypt.so.1 (0x40187000)
>         libnsl.so.1 => /lib/libnsl.so.1 (0x401b3000)
>         libm.so.6 => /lib/libm.so.6 (0x401c7000)
>         libnss_files.so.2 => /lib/libnss_files.so.2 (0x401e8000)
>         libnss_dns.so.2 => /lib/libnss_dns.so.2 (0x401f3000)
>         libresolv.so.2 => /lib/libresolv.so.2 (0x401f7000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

My first guess is that MACHINE_2 lacks shared versions of some of
    these libraries. Look for libcrypt.so, libnsl.so, libm.so, etc, on
    MACHINE_2. If you cannot find them, you need to install them.

> 
> in MACHINE_2 :
> 
> $ ldd iaac
>         libz.so.1 => /usr/lib/libz.so.1 (0x4001d000)
>         libc.so.6 => /lib/i686/libc.so.6 (0x4002c000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[snip]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Different binary size
@ 2004-03-23 10:12 Admin-Stress
  2004-03-23 13:02 ` llewelly
  0 siblings, 1 reply; 4+ messages in thread
From: Admin-Stress @ 2004-03-23 10:12 UTC (permalink / raw)
  To: gcc-help

I compiled a program in two machines, both are using the same gcc, MySQL library, and glibc (both
are RedHat 9).

The first machine (MACHINE_1) produced 20 KB binary size, but in second machine (MACHINE_2)
produced 181 KB binary size.

I know that the problem is MACHINE_2 cant dynamically link the libray. How can I fix this in
MACHINE_2 so it can produce dynamic link? 

Here is my compile script :

gcc -o iaac iaac.c -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient -lz

Please help me.

in MACHINE_1 :

$ ldd iaac
        libmysqlclient.so.12 => /usr/lib/libmysqlclient.so.12 (0x4001c000)
        libz.so.1 => /usr/lib/libz.so.1 (0x40052000)
        libc.so.6 => /lib/libc.so.6 (0x40060000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40187000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x401b3000)
        libm.so.6 => /lib/libm.so.6 (0x401c7000)
        libnss_files.so.2 => /lib/libnss_files.so.2 (0x401e8000)
        libnss_dns.so.2 => /lib/libnss_dns.so.2 (0x401f3000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x401f7000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

in MACHINE_2 :

$ ldd iaac
        libz.so.1 => /usr/lib/libz.so.1 (0x4001d000)
        libc.so.6 => /lib/i686/libc.so.6 (0x4002c000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-03-23 10:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-23 13:37 Different binary size Lev Assinovsky
2004-03-23 14:52 ` Admin-Stress
  -- strict thread matches above, loose matches on Subject: below --
2004-03-23 10:12 Admin-Stress
2004-03-23 13:02 ` llewelly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).