public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "artem at bizlink dot ru" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/12596] configure setting --with-libiconv-prefix doesn't get passed to gcc-subdir
Date: Fri, 12 Mar 2004 08:28:00 -0000	[thread overview]
Message-ID: <20040312082818.20305.qmail@sources.redhat.com> (raw)
In-Reply-To: <20031013131412.12596.ppohja@iki.fi>


------- Additional Comments From artem at bizlink dot ru  2004-03-12 08:27 -------
I recently tried to build GCC on FreeBSD-5.2.1 (and with fresh 
autoconf/automake). GCC is "gcc-3.4-20040303".

I have libiconv-1.9.1 port installed (in /usr/local, that is).

Configured with: ../configure --prefix=/usr/local/gcc-20040303-4 --disable-nls 
--enable-languages=c,c++,java --disable-java-awt --without-x 
--enable-threads=posix --with-libiconv-prefix=/usr/local --with-dwarf2

Here is what I see:

intl/config.h - HAVE_ICONV defined!
i386-unknown-freebsd5.2.1/libstdc++-v3/config.h - HAVE_ICONV is not defined.
i386-unknown-freebsd5.2.1/libjava/include/config.h - HAVE_ICONV is not defined.

8<----------------------->8
...
Configuring in libiberty
...
checking for iconv... yes
checking how to link with libiconv... /usr/local/lib/libiconv.so -rpath 
/usr/local/lib                 
checking for iconv declaration...
         extern size_t iconv (iconv_t cd, const char * *inbuf, size_t 
*inbytesleft, char * *outbuf, size_t *outbytesleft);
...
Configuring in gcc
...
checking for iconv.h... yes
checking for iconv... no, consider installing GNU libiconv
...
Configuring in i386-unknown-freebsd5.2.1/libstdc++-v3
...
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking langinfo.h usability... yes   
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking for iconv in -liconv... no
checking for iconv_open... no
checking for iconv_close... no
checking for iconv... no
checking for nl_langinfo... yes
...
Configuring in i386-unknown-freebsd5.2.1/zlib
...
checking for iconv... no, consider installing GNU libiconv
8<----------------------->8

Here is "i386-unknown-freebsd5.2.1/libjava/config.log":
8<----------------------->8
configure:5272: checking for iconv
configure:5290: /usr/home/artem/gcj/t1/gcc-3.4-20040303/o/gcc/xgcc 
-B/usr/home/artem/gcj/t1/gcc-3.4-20040303/o/
/var/tmp//ccG5l3Eo.o: In function `main':
/usr/home/artem/gcj/t1/gcc-3.4-20040303/o/i386-unknown-freebsd5.2.
1/libjava/configure:5284: undefined reference
/usr/home/artem/gcj/t1/gcc-3.4-20040303/o/i386-unknown-freebsd5.2.
1/libjava/configure:5285: undefined reference
/usr/home/artem/gcj/t1/gcc-3.4-20040303/o/i386-unknown-freebsd5.2.
1/libjava/configure:5286: undefined reference
collect2: ld returned 1 exit status
configure: failed program was:
#line 5280 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
int main() {
iconv_t cd = iconv_open("","");
       iconv(cd,NULL,NULL,NULL,NULL);
       iconv_close(cd);
; return 0; }
configure:5312: /usr/home/artem/gcj/t1/gcc-3.4-20040303/o/gcc/xgcc 
-B/usr/home/artem/gcj/t1/gcc-3.4-20040303/o/
/usr/bin/ld: cannot find -liconv
collect2: ld returned 1 exit status
configure: failed program was:
#line 5302 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
int main() {
iconv_t cd = iconv_open("","");
         iconv(cd,NULL,NULL,NULL,NULL);
         iconv_close(cd);
; return 0; }
8<----------------------->8

Trying it by hands:
8<----------------------->8
artem@vg:/tmp/$ cat > test.c              
#line 5280 "configure"

#include <stdlib.h>
#include <iconv.h>
int main() {
iconv_t cd = iconv_open("","");
       iconv(cd,NULL,NULL,NULL,NULL);
       iconv_close(cd);
; return 0; }
artem@vg:/tmp/$ gcc test.c -o test -liconv
/usr/bin/ld: cannot find -liconv
collect2: ld returned 1 exit status
artem@vg:/tmp/$ gcc test.c -o test -liconv -L/usr/local/lib
artem@vg:/tmp/$ ldd test
test:
        libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28073000)
        libc.so.5 => /lib/libc.so.5 (0x28162000)
8<----------------------->8

It seems the real problem is that gcc on FreeBSD does not include /usr/local/lib 
in linker search path by default.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12596


  parent reply	other threads:[~2004-03-12  8:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-13 13:14 [Bug bootstrap/12596] New: " ppohja at iki dot fi
2003-11-08 21:12 ` [Bug bootstrap/12596] " dhazeghi at yahoo dot com
2004-01-17 23:20 ` dhazeghi at yahoo dot com
2004-02-27 15:54 ` pinskia at gcc dot gnu dot org
2004-03-04 16:17 ` pinskia at gcc dot gnu dot org
2004-03-04 16:41 ` artem at bizlink dot ru
2004-03-04 17:52 ` artem at bizlink dot ru
2004-03-12  8:28 ` artem at bizlink dot ru [this message]
     [not found] <bug-12596-4@http.gcc.gnu.org/bugzilla/>
2023-01-27 19:44 ` vital.had at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040312082818.20305.qmail@sources.redhat.com \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).