public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Anthony Green <green@moxielogic.com>
To: gcc@gcc.gnu.org
Subject: Problems with in-tree host libraries (gmp, ppl, etc)
Date: Sat, 02 May 2009 14:24:00 -0000	[thread overview]
Message-ID: <1241274289.21584.6.camel@dev.moxielogic.com> (raw)

The top level configury suggests that you can simply drop gmp, ppl, etc
into the top level source dir and they will get configured and used.
Does this really work?

At the very least, I think ppl requires that gmp be configured with
--enable-cxx, like so:

Index: Makefile.def
===================================================================
--- Makefile.def        (revision 146995)
+++ Makefile.def        (working copy)
@@ -60,7 +60,7 @@
 host_modules= { module= gawk; };
 host_modules= { module= gettext; };
 host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
-               extra_configure_flags='--disable-shared';
+               extra_configure_flags='--disable-shared --enable-cxx';
                no_install= true; 
                host="none-${host_vendor}-${host_os}";
                target="none-${host_vendor}-${host_os}"; };

Even then, the ppl configury isn't detecting the gmp we just built.  It
seems as though we should install gmp in a local temporary install tree
and point ppl at that.  See below for a trace of the ppl configury as it
attempts to detect an in-tree gmp (after applying the patch above).

AG



+ test -n /builddir/build/BUILD/gcc/build/./gmp/
+ test -z /builddir/build/BUILD/gcc/build/./gmp/
+ test -n /builddir/build/BUILD/gcc/build/./gmp/
+ test -z /builddir/build/BUILD/gcc/build/./gmp/
+ printf '%s\n' 'configure:15514: checking how to link with libgmp'
+ printf %s 'checking how to link with libgmp... '
checking how to link with libgmp... + test '' = set
+ use_additional=yes
+ acl_save_prefix=/usr
+ prefix=/usr
+ acl_save_exec_prefix=/usr
+ exec_prefix=/usr
+ eval 'additional_includedir="/usr/include"'
++ additional_includedir=/usr/include
+ eval 'additional_libdir="/usr/lib"'
++ additional_libdir=/usr/lib
+ exec_prefix=/usr
+ prefix=/usr
+ test set = set
+ withval=/builddir/build/BUILD/gcc/build/./gmp/
+ test X/builddir/build/BUILD/gcc/build/./gmp/ = Xno
+ test X/builddir/build/BUILD/gcc/build/./gmp/ = X
+ additional_includedir=/builddir/build/BUILD/gcc/build/./gmp//include
+ additional_libdir=/builddir/build/BUILD/gcc/build/./gmp//lib
+ LIBGMP=
+ LTLIBGMP=
+ INCGMP=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='gmp '
+ test -n 'gmp '
+ names_this_round='gmp '
+ names_next_round=
+ for name in '$names_this_round'
+ already_handled=
+ test -z ''
+ names_already_handled=' gmp'
++ echo gmp
++ sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|
ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'
+ uppername=GMP
+ eval 'value="$HAVE_LIBGMP"'
++ value=
+ test -n ''
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ test yes = yes
+ test -n so
+ test -f /builddir/build/BUILD/gcc/build/./gmp//lib/libgmp.so
+ test -f /builddir/build/BUILD/gcc/build/./gmp//lib/libgmp.a
+ test X = X
+ test X '!=' X
+ LIBGMP=-lgmp
+ LTLIBGMP=-lgmp
+ test -n ''
+ test X '!=' X
+ test X '!=' X
+ ac_cv_libgmp_libs=-lgmp
+ ac_cv_libgmp_ltlibs=-lgmp
+ ac_cv_libgmp_cppflags=
+ printf '%s\n' 'configure:15903: result: -lgmp'
+ printf '%s\n' -lgmp
-lgmp
+ LIBGMP=-lgmp
+ LTLIBGMP=-lgmp
+ INCGMP=
+ HAVE_LIBGMP=yes
+ printf '%s\n' 'configure:15943: checking how to link with libgmpxx'
+ printf %s 'checking how to link with libgmpxx... '
checking how to link with libgmpxx... + test '' = set
+ use_additional=yes
+ acl_save_prefix=/usr
+ prefix=/usr
+ acl_save_exec_prefix=/usr
+ exec_prefix=/usr
+ eval 'additional_includedir="/usr/include"'
++ additional_includedir=/usr/include
+ eval 'additional_libdir="/usr/lib"'
++ additional_libdir=/usr/lib
+ exec_prefix=/usr
+ prefix=/usr
+ test set = set
+ withval=/builddir/build/BUILD/gcc/build/./gmp/
+ test X/builddir/build/BUILD/gcc/build/./gmp/ = Xno
+ test X/builddir/build/BUILD/gcc/build/./gmp/ = X
+ additional_includedir=/builddir/build/BUILD/gcc/build/./gmp//include
+ additional_libdir=/builddir/build/BUILD/gcc/build/./gmp//lib
+ LIBGMPXX=
+ LTLIBGMPXX=
+ INCGMPXX=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='gmpxx gmp'
+ test -n 'gmpxx gmp'
+ names_this_round='gmpxx gmp'
+ names_next_round=
+ for name in '$names_this_round'
+ already_handled=
+ test -z ''
+ names_already_handled=' gmpxx'
++ echo gmpxx
++ sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|
ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'
+ uppername=GMPXX
+ eval 'value="$HAVE_LIBGMPXX"'
++ value=
+ test -n ''
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ test yes = yes
+ test -n so
+ test -f /builddir/build/BUILD/gcc/build/./gmp//lib/libgmpxx.so
+ test -f /builddir/build/BUILD/gcc/build/./gmp//lib/libgmpxx.a
+ test X = X
+ test X '!=' X
+ LIBGMPXX=-lgmpxx
+ LTLIBGMPXX=-lgmpxx
+ for name in '$names_this_round'
+ already_handled=
+ for n in '$names_already_handled'
+ test gmpxx = gmp
+ test -z ''
+ names_already_handled=' gmpxx gmp'
++ echo gmp
++ sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|
ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'
+ uppername=GMP
+ eval 'value="$HAVE_LIBGMP"'
++ value=yes
+ test -n yes
+ test yes = yes
+ eval 'value="$LIBGMP"'
++ value=-lgmp
+ test -z -lgmp
+ LIBGMPXX='-lgmpxx -lgmp'
+ eval 'value="$LTLIBGMP"'
++ value=-lgmp
+ test -z -lgmp
+ LTLIBGMPXX='-lgmpxx -lgmp'
+ test -n ''
+ test X '!=' X
+ test X '!=' X
+ ac_cv_libgmpxx_libs='-lgmpxx -lgmp'
+ ac_cv_libgmpxx_ltlibs='-lgmpxx -lgmp'
+ ac_cv_libgmpxx_cppflags=
+ printf '%s\n' 'configure:16332: result: -lgmpxx -lgmp'
+ printf '%s\n' '-lgmpxx -lgmp'
-lgmpxx -lgmp
+ LIBGMPXX='-lgmpxx -lgmp'
+ LTLIBGMPXX='-lgmpxx -lgmp'
+ INCGMPXX=
+ HAVE_LIBGMPXX=yes
+ ac_save_LIBS=
+ LIBS=' -lgmpxx -lgmp'
+ ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS
conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=yes
+ printf '%s\n' 'configure:16376: checking for the GMP library version
4.1.3 or above'
+ printf %s 'checking for the GMP library version 4.1.3 or above... '
checking for the GMP library version 4.1.3 or above... + test yes = yes
+ cat
+ cat confdefs.h
+ cat
+ rm -f conftest.o
+ ac_try='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ case "(($ac_try" in
+ ac_try_echo='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ eval 'ac_try_echo="$as_me:16404: $CXX -c $CXXFLAGS $CPPFLAGS
conftest.$ac_ext >&5"'
++ ac_try_echo='configure:16404: g++ -c  -g -O2 -frounding-math -g -O2
conftest.cpp >&5'
+ printf '%s\n' 'configure:16404: g++ -c  -g -O2 -frounding-math -g -O2
conftest.cpp >&5'
+ ac_status=1
+ grep -v '^ *+' conftest.er1
+ rm -f conftest.er1
+ cat conftest.err
+ printf '%s\n' 'configure:16411: $? = 1'
+ exit 1
+ printf '%s\n' 'configure: failed program was:'
+ sed 's/^/| /' conftest.cpp
+ printf '%s\n' 'configure:16423: result: no'
+ printf '%s\n' no
no
+ ac_cv_have_gmp=no
+ rm -f core conftest.err conftest.o conftest.cpp
+ have_gmp=no
+ test xno = xyes
+ ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS
conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=yes
+ LIBS=
+ gmp_library_option='-lgmpxx -lgmp'
+ test xno = xno
+ printf '%s\n' 'configure:17018: error: Cannot find GMP version 4.1.3
or higher.
GMP is the GNU Multi-Precision library:
see http://www.swox.com/gmp/ for more information.
When compiling the GMP library, do not forget to enable the C++
interface:
add --enable-cxx to the configuration options.'
+ printf '%s\n' 'configure: error: Cannot find GMP version 4.1.3 or
higher.
GMP is the GNU Multi-Precision library:
see http://www.swox.com/gmp/ for more information.
When compiling the GMP library, do not forget to enable the C++
interface:
add --enable-cxx to the configuration options.'
configure: error: Cannot find GMP version 4.1.3 or higher.
GMP is the GNU Multi-Precision library:
see http://www.swox.com/gmp/ for more information.
When compiling the GMP library, do not forget to enable the C++
interface:
add --enable-cxx to the configuration options.
+ exit 1


             reply	other threads:[~2009-05-02 14:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-02 14:24 Anthony Green [this message]
2009-05-03  7:01 ` Kaveh R. GHAZI
2009-05-04  7:17   ` Paolo Bonzini
2009-05-04 22:45     ` Mark Mitchell
2009-05-05  6:20       ` Paolo Bonzini
2009-05-06  8:11   ` Roberto Bagnara
2009-05-06 10:50     ` Paolo Bonzini

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=1241274289.21584.6.camel@dev.moxielogic.com \
    --to=green@moxielogic.com \
    --cc=gcc@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).