Woody linker/compiler problem

2002-02-28 Thread Miha Tomšič
Hello!

I have a problem with linking under latest woody/i686. I first contacted 
Christopher C. Chimelis because I thought the problem is in the binutils.

---

Let's say I have a simple program sdltest.c (the ones are usually used by
./configure script).

#include 
int main(int argc, char **argv) {
return 0;
} // main()

gcc -o sdltest sdltest.c `sdl-config --cflags` `sdl-config --libs`
won't compile because there are undefined references to libX11 functions. 

Just for the record sdl-config --cflags provides the following:
-I/usr/include/SDL -D_REENTRANT
and sdl-config --libs provides:
-L/usr/lib -lSDL -lpthread -L/usr/X11R6/lib -lXxf86dga -lXxf86vm -lXv

It only compiles after I put all the referenced libs *from /usr/X11R6/lib*
on the command line explicitly like:

gcc -o sdltest sdltest.c `sdl-config --cflags` `sdl-config --libs` -lX11
-lXext

The problam is that linker can't find libraries from /usr/X11R6/lib by
itself. There's no problem with libs from /lib or /usr/lib. They get
automaticly linked.  

josef:~/programming/c/test$ ldd sdltest
libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x40022000)
libpthread.so.0 => /lib/libpthread.so.0 (0x4009d000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x400b3000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x4018e000)
libc.so.6 => /lib/libc.so.6 (0x4019c000)
libdl.so.2 => /lib/libdl.so.2 (0x402be000)
libm.so.6 => /lib/libm.so.6 (0x402c2000)
libasound.so.1 => /usr/lib/libasound.so.1 (0x402e4000)
libartsc.so.0 => /usr/lib/libartsc.so.0 (0x402fc000)
libesd.so.0 => /usr/lib/libesd.so.0 (0x40303000)
libaudiofile.so.0 => /usr/lib/libaudiofile.so.0 (0x4030a000)
libggi.so.2 => /usr/lib/libggi.so.2 (0x40328000)
libgii.so.0 => /usr/lib/libgii.so.0 (0x40333000)
libgg.so.0 => /usr/lib/libgg.so.0 (0x4033a000)
libvga.so.1 => /usr/lib/libvga.so.1 (0x4034)
libaa.so.1 => /usr/lib/libaa.so.1 (0x4039e000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x4000)
libslang.so.1 => /lib/libslang.so.1 (0x403b9000)
libgpm.so.1 => /usr/lib/libgpm.so.1 (0x4041a000)
libncurses.so.5 => /lib/libncurses.so.5 (0x4042)

I don't remember having this problems back on potato. People using other
distributions don't have this problem either.

Can this be resolved in any way?

---

This is the original post I sent to Christopher. He said he never had any
problems whatsoever. Also other people I asked have no problems with this
kind of linking/compiling. 

I also tried adding -Wl,-rpath,/usr/X11R6/lib and it compiles without any
problem. But with -Wl,-L,/usr/X11R6/lib it doesn't work either.

In the 'man ld' there is a long list (1 to 8) of items that are searched
for libs at link time. But on my system this is not the case. -L doesn't
get searched and neither /etc/ld.so.cache is examined for the missing
libs.  

josef:/etc# cat /etc/ld.so.conf
/usr/X11R6/lib
/usr/local/lib

This is what i am getting in the gcc(ld) output:

/usr/bin/ld: warning: libX11.so.6, needed by /usr/lib/libSDL.so, not found
(try using -rpath or -rpath-link)
/usr/bin/ld: warning: libXext.so.6, needed by /usr/lib/libSDL.so, not
found (try using -rpath or -rpath-link)

Why should I try -rpath? Why is it so much better than -L?

I am sorry to ask things that I don't know anything about, but this is
going on for a while now and is getting me pretty pissed.  

Sorry for a long post.

Thanks and take care,

Miha...




Re: Moving ARM g77 to g77-3.0

2002-02-28 Thread Phil Blundell
On Wed, 2002-02-27 at 23:04, Matthias Klose wrote:
> No problem. I'll update the CVS this weekend. Please wait with the
> upload until the current version did move to testing (should be in
> three days).

Which current version are we talking about?  According to
update-excuses:

* gcc-defaults (0.16 to 0.18)

* Maintainer: Debian GCC maintainers
* 29 days old (needed 5 days)
* gcj/mips unsatisfiable Depends: gcj-3.0
* gij/mips unsatisfiable Depends: gij-3.0
* gcj/mipsel unsatisfiable Depends: gcj-3.0
* gij/mipsel unsatisfiable Depends: gij-3.0
* Valid candidate
* Depends: gcc-defaults gcc-3.0
* Depends: gcc-defaults gcc-2.95

p.




Std::basic_ostringstream

2002-02-28 Thread Eric T. Korb
I'm also getting a Seg Fault executing the following code snippet using
gcc3.0.  Are there any known problems with ostringstream in 3.0?  Thanks
in advance,

- Eric

#include 

int main ()
{
std::basic_ostringstream buffer;
}

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martin v. Loewis
Sent: Thursday, February 21, 2002 12:06 PM
To: Eric T. Korb
Cc: debian-gcc@lists.debian.org
Subject: Re: Wchar_t and wstring


"Eric T. Korb" <[EMAIL PROTECTED]> writes:

> Does anyone know how to build GCC3.0 for Debian 2.2_rev3 such that 
> wchar_t is fully functional?  I'm getting compilation errors on:
>   /home/ekorb/OpenVXI_2.0/src/VXI/DocumentModel.cpp:38: undefined 
> reference to `std::_Format_cache::_Format_cache()'
> When trying to compile OpenVXI.  Any assistance appreciated,

It's most likely not a build issue, but rather a plain bug. Submit a bug
report (ideally including a small test case which reproduces the
problem).

Regards,
Martin




Áñ°Üã±â¿¡ Ãß°¡Çصµ ÁÁÀº»çÀÌÆ® [±¤ °í]

2002-02-28 Thread ±èºÎÀå
Title: Untitled-1






원치않는 메일을 받으셨다면 정말로 죄송합니다.E-Mail 주소 외에, 다른 정보는 갖고 있지 않습니다.본메일은
1회만 발송하는 메일입니다. 시스템 오류로 중복으로 발송된 문제에
대해서 죄송합니다.			






























































 





Áñ°Üã±â¿¡ Ãß°¡Çصµ ÁÁÀº»çÀÌÆ® [±¤ °í]

2002-02-28 Thread ±èºÎÀå
Title: Untitled-1






원치않는 메일을 받으셨다면 정말로 죄송합니다.E-Mail 주소 외에, 다른 정보는 갖고 있지 않습니다.본메일은
1회만 발송하는 메일입니다. 시스템 오류로 중복으로 발송된 문제에
대해서 죄송합니다.			






























































 





Re: Std::basic_ostringstream

2002-02-28 Thread Phil Edwards
On Thu, Feb 28, 2002 at 10:28:42AM -0500, Eric T. Korb wrote:
> I'm also getting a Seg Fault executing the following code snippet using
> gcc3.0.  Are there any known problems with ostringstream in 3.0?  Thanks
> in advance,
> 
> - Eric
> 
> #include 
> 
> int main ()
> {
> std::basic_ostringstream buffer;
> }

No problems with ostringstream directly, but the 3.0 series is weak on
wide-character I/O support.  We just branched for 3.1, and your test
snippet works fine with a 3.1 snapshot.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.- Samuel Adams




Áñ°Üã±â¿¡ Ãß°¡Çصµ ÁÁÀº»çÀÌÆ® [±¤ °í]

2002-02-28 Thread ±èºÎÀå
Title: Untitled-1






원치않는 메일을 받으셨다면 정말로 죄송합니다.E-Mail 주소 외에, 다른 정보는 갖고 있지 않습니다.본메일은
1회만 발송하는 메일입니다. 시스템 오류로 중복으로 발송된 문제에
대해서 죄송합니다.