public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Trevor Woerner <twoerner@gmail.com>
To: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: crossgcc@sourceware.org
Subject: Re: build failure in native gdb with crosstool-ng-1.13.1 on openSUSE 12.1
Date: Mon, 12 Dec 2011 21:53:00 -0000	[thread overview]
Message-ID: <CAHUNapQKvYAJxFe3ZV=Pr0x+UjpoNJ2YWHDF82urtDiZRN+hZA@mail.gmail.com> (raw)
In-Reply-To: <201112121507.32134.yann.morin.1998@anciens.enib.fr>

[-- Attachment #1: Type: text/plain, Size: 2214 bytes --]

Both openSUSE-32 and openSUSE-64 introduced a "config.site" file and
define a CONFIG_SITE environment variable to point to this file in the
default configuration (/etc/profile.d/profile.sh). On 64-bit systems
this file is /usr/share/site/x86_64-unknown-linux-gnu and on 32-bit
systems it is /usr/share/site/i686-pc-linux-gnu. Neither version
(32-bit nor 64-bit) of 11.4 had this mechanism.

More information about this mechanism can be found in the "autoconf" info file.

On openSUSE 12.1 I was seeing 2 build failures trying to build the
arm-cortex_a8-linux-gnueabi recipe:
1) gdb-native would fail because needed libraries were being placed
into "lib64" directories by earlier parts of the build when "lib"
directories were provided in "-L" options to later parts
2) in one of the last steps "make" was doing an "install-strip" step
which was failing mysteriously

This recipe builds just fine on either 32- or 64-bit versions of openSUSE 11.4.

On the buildroot mailing list Guillaume Gardet was also seeing build
failures with the 64-bit version of openSUSE, in fact he was the one
who tracked this problem down to the CONFIG_SITE environment variable.
He proposed a patch to the "/usr/share/site/x86_64-unknown-linux-gnu"
file because he noticed it was looking for a "host" ./configure option
but not including the ARM architecture in its "case" statement.

Also on the buildroot mailing list Peter Korsgaard suggested unsetting
the CONFIG_SITE environment variable prior to building.

On this list Yann proposed a patch to crosstool-NG to explicitly place
the native libraries in a "lib" directory so the subsequent "-L" would
use the correct directory.

On openSUSE 12.1 64-bit using Yann's patch .OR. Guillaume's patch .OR.
unsetting CONFIG_SITE by themselves solved the gdb-native build
failure. However, only unsetting CONFIG_PATH solved the
"install-strip" problem.

openSUSE 11.4 does not include the CONFIG_PATH mechanism in either of
the 32-bit or 64-bit installs, so crosstool-NG builds fine on those
distributions.

On openSUSE 12.1 32-bit nothing needs to be done to get "gdb-native"
to build correctly, however the "install-strip" phase also fails
unless CONFIG_PATH is unset in the environment.

[-- Attachment #2: i686-pc-linux-gnu --]
[-- Type: application/octet-stream, Size: 1286 bytes --]

#!/bin/sh
# Site script for configure. It is resourced via \$CONFIG_SITE environment varaible.

# If user did not specify libexecdir, guess the correct target:
# Nor FHS nor openSUSE allow prefix/libexec. Let's default to prefix/lib.

libexecdir='${exec_prefix}/lib'

# Continue with the standard behavior of configure defined in AC_SITE_LOAD:
if test "x$prefix" != xNONE; then
	ac_site_file1=$prefix/share/config.site
	ac_site_file2=$prefix/etc/config.site
else
	ac_site_file1=$ac_default_prefix/share/config.site
	ac_site_file2=$ac_default_prefix/etc/config.site
fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
	test "x$ac_site_file" = xNONE && continue
	if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
		{ $as_echo "/usr/share/site/i686-pc-linux-gnu:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "/usr/share/site/i686-pc-linux-gnu: loading site script $ac_site_file" >&6;}
		sed 's/^/| /' "$ac_site_file" >&5
		. "$ac_site_file" \
			|| { { $as_echo "/usr/share/site/i686-pc-linux-gnu:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "/usr/share/site/i686-pc-linux-gnu: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
	fi
done

[-- Attachment #3: x86_64-unknown-linux-gnu --]
[-- Type: application/octet-stream, Size: 2469 bytes --]

#!/bin/sh
# Site script for configure. It is resourced via \$CONFIG_SITE environment varaible.

# If user did not specify libdir, guess the correct target:
# Use lib64 for 64 bit targets, keep the default for the rest.
if test "$libdir" = '${exec_prefix}/lib' ; then

	# We are trying to guess 32-bit target compilation. It's not as easy as
	# it sounds, as there is possible several intermediate combinations.
	ac_config_site_32bit_target=NONE

	# User defined -m32 in CFLAGS or CXXFLAGS:
	# (It's sufficient for 32-bit, but alone may cause mis-behavior of some checks.)
	case "$CFLAGS" in
		*-m32*)
			ac_config_site_32bit_target=YES
			;;
	esac
	case "$CXXFLAGS" in
		*-m32*)
			ac_config_site_32bit_target=YES
			;;
	esac

	# User explicitly specified counterpart --host:
	# (If cross toolchain is installed, generates 32-bit, else generates native.)
	case "$host" in
			*i[3456]86-* | ppc-* | s390-* )
			ac_config_site_32bit_target=YES
			;;
	esac

	# Running with linux32:
	# (Changes detected platform, but not the toolchain target.)
	case "`/bin/uname -i`" in
		x86_64 | ppc64 | s390x )
			;;
		* )
			ac_config_site_32bit_target=YES
			;;
	esac

	if test "x$ac_config_site_32bit_target" = xNONE; then
		libdir='${exec_prefix}/lib64'
	fi
fi

# If user did not specify libexecdir, guess the correct target:
# Nor FHS nor openSUSE allow prefix/libexec. Let's default to prefix/lib.

libexecdir='${exec_prefix}/lib'

# Continue with the standard behavior of configure defined in AC_SITE_LOAD:
if test "x$prefix" != xNONE; then
	ac_site_file1=$prefix/share/config.site
	ac_site_file2=$prefix/etc/config.site
else
	ac_site_file1=$ac_default_prefix/share/config.site
	ac_site_file2=$ac_default_prefix/etc/config.site
fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
	test "x$ac_site_file" = xNONE && continue
	if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
		{ $as_echo "/usr/share/site/x86_64-unknown-linux-gnu:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "/usr/share/site/x86_64-unknown-linux-gnu: loading site script $ac_site_file" >&6;}
		sed 's/^/| /' "$ac_site_file" >&5
		. "$ac_site_file" \
			|| { { $as_echo "/usr/share/site/x86_64-unknown-linux-gnu:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "/usr/share/site/x86_64-unknown-linux-gnu: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
	fi
done

[-- Attachment #4: Type: text/plain, Size: 71 bytes --]

--
For unsubscribe information see http://sourceware.org/lists.html#faq

  reply	other threads:[~2011-12-12 21:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-28 23:19 Trevor Woerner
2011-11-29 22:54 ` Yann E. MORIN
     [not found]   ` <CAHUNapRiJtqH3yJDztc-ZroJKzjgRWuSwDKNjZVYYSn5iM0ryA@mail.gmail.com>
2011-11-30  2:46     ` Trevor Woerner
2011-12-05 22:36       ` Trevor Woerner
2011-12-11 21:44         ` Yann E. MORIN
2011-12-12 12:36         ` Yann E. MORIN
2011-12-12 13:54           ` Trevor Woerner
2011-12-12 14:07             ` Yann E. MORIN
2011-12-12 21:53               ` Trevor Woerner [this message]
2011-12-12 22:43                 ` Yann E. MORIN
2011-12-13  3:43                   ` Trevor Woerner

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='CAHUNapQKvYAJxFe3ZV=Pr0x+UjpoNJ2YWHDF82urtDiZRN+hZA@mail.gmail.com' \
    --to=twoerner@gmail.com \
    --cc=crossgcc@sourceware.org \
    --cc=yann.morin.1998@anciens.enib.fr \
    /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).