From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.bugs Subject: bug#12047: 24.1.50; configure fails on Gentoo FreeBSD Date: Thu, 26 Jul 2012 01:05:32 +0200 Message-ID: <20496.31676.541743.480447@a1i15.kph.uni-mainz.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----cutting-here-may-damage-your-screen-surface----81848708----" X-Trace: dough.gmane.org 1343257585 32630 80.91.229.3 (25 Jul 2012 23:06:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 Jul 2012 23:06:25 +0000 (UTC) To: 12047@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 26 01:06:23 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SuAer-0006G4-Jk for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Jul 2012 01:06:21 +0200 Original-Received: from localhost ([::1]:48336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuAeq-0007gX-8d for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jul 2012 19:06:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuAem-0007g1-PZ for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2012 19:06:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuAel-00064P-Ea for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2012 19:06:16 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58421) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuAel-00064K-B0 for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2012 19:06:15 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SuAlK-0000Wn-LR for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2012 19:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ulrich Mueller Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jul 2012 23:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12047 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13432579642003 (code B ref -1); Wed, 25 Jul 2012 23:13:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Jul 2012 23:12:44 +0000 Original-Received: from localhost ([127.0.0.1]:39734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SuAl1-0000WG-Pu for submit@debbugs.gnu.org; Wed, 25 Jul 2012 19:12:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46296) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SuAky-0000W8-LX for submit@debbugs.gnu.org; Wed, 25 Jul 2012 19:12:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuAeN-0005pa-FT for submit@debbugs.gnu.org; Wed, 25 Jul 2012 19:05:52 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:57836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuAeN-0005pW-Bl for submit@debbugs.gnu.org; Wed, 25 Jul 2012 19:05:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuAeM-0007aH-1P for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2012 19:05:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuAeI-0005oz-6T for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2012 19:05:49 -0400 Original-Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]:58178) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuAeH-0005oI-Fa for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2012 19:05:45 -0400 Original-Received: from a1i15.kph.uni-mainz.de (a1i15.kph.uni-mainz.de [134.93.134.92]) by a1iwww1.kph.uni-mainz.de (8.14.4/8.13.4) with ESMTP id q6PN5XTo009235 for ; Thu, 26 Jul 2012 01:05:33 +0200 Original-Received: from a1i15.kph.uni-mainz.de (localhost [127.0.0.1]) by a1i15.kph.uni-mainz.de (8.14.5/8.14.2) with ESMTP id q6PN5WGB031668; Thu, 26 Jul 2012 01:05:32 +0200 Original-Received: (from ulm@localhost) by a1i15.kph.uni-mainz.de (8.14.5/8.14.5/Submit) id q6PN5Wv8031664; Thu, 26 Jul 2012 01:05:32 +0200 X-Mailer: VM 8.2.0b under 23.4.2 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62385 Archived-At: ------cutting-here-may-damage-your-screen-surface----81848708---- Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Emacs from BZR (but also 24.1) fails on Gentoo FreeBSD 9.0 during configure: configure: error: Required file(s) not found: crtn.o crt1.o crti.o Try using the --with-crt-dir option. $ uname -a FreeBSD eunomia 9.0-Gentoo FreeBSD Gentoo 9.0 #0: Tue Jul 24 02:42:55 CEST 2012 root@:/usr/src/sys/amd64/compile/GENERIC amd64 The problem is that crt{1,i,n}.o (which are installed by freebsd-lib) are located in /usr/lib, whereas crt{begin,end}.o (installed by gcc) are in /usr/lib/gcc/x86_64-gentoo-freebsd9.0/4.5.3. Obviously, specifying a location with --with-crt-dir wouldn't help in this situation, because configure assumes that all crt*.o files are in the same directory. Attached patch fixes the problem for me. (Another question is why crtbegin.o and crtend.o are needed for linking on FreeBSD, in the first place? Emacs builds and runs here without apparent problems, even if linked without these files.) ------cutting-here-may-damage-your-screen-surface----81848708---- Content-Type: text/plain; name="emacs.patch" Content-Disposition: inline; filename="emacs.patch" Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by a1iwww1.kph.uni-mainz.de id q6PN5XTo009235 --- emacs-orig/ChangeLog +++ emacs/ChangeLog @@ -1,3 +1,10 @@ +2012-07-25 Ulrich M=C3=BCller + + * configure.in: Don't assume that crtbegin.o and crtend.o are in + the same directory as crt1.o. + (--with-crtbegin-dir): New option. + (CRTBEGIN_DIR): New output variable. + 2012-07-17 Dmitry Antipov =20 Fix toolkit configuration report. --- emacs-orig/src/ChangeLog +++ emacs/src/ChangeLog @@ -1,3 +1,7 @@ +2012-07-25 Ulrich M=C3=BCller + + * Makefile.in (CRTBEGIN_DIR): New variable. + 2012-07-25 Martin Rudalics =20 * frame.c (Fredirect_frame_focus): In doc-string don't mention --- emacs-orig/configure.ac +++ emacs/configure.ac @@ -212,6 +212,12 @@ The default is /usr/lib, or /usr/lib64 on some platforms.])]) CRT_DIR=3D"${with_crt_dir}" =20 +CRTBEGIN_DIR=3D$CRT_DIR +AC_ARG_WITH([crtbegin-dir], +[AS_HELP_STRING([--with-crtbegin-dir=3DDIR], +[directory containing crtbegin.o and crtend.o; defaults to crt-dir])]) +CRTBEGIN_DIR=3D"${with_crtbegin_dir}" + AC_ARG_WITH(gameuser,dnl [AS_HELP_STRING([--with-gameuser=3DUSER],[user for shared game score fil= es])]) test "X${with_gameuser}" !=3D X && test "${with_gameuser}" !=3D yes \ @@ -987,8 +993,8 @@ START_FILES=3D'pre-crt0.o' ;; freebsd ) - LIB_STANDARD=3D'-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.= o' - START_FILES=3D'pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_= DIR)/crtbegin.o' + LIB_STANDARD=3D'-lgcc -lc -lgcc $(CRTBEGIN_DIR)/crtend.o $(CRT_DIR)/= crtn.o' + START_FILES=3D'pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRTB= EGIN_DIR)/crtbegin.o' SYSTEM_TYPE=3Dberkeley-unix ;; gnu-linux | gnu-kfreebsd ) @@ -1001,8 +1007,8 @@ ;; dnl NB this may be adjusted below. netbsd | openbsd ) - LIB_STANDARD=3D'-lgcc -lc -lgcc $(CRT_DIR)/crtend.o' - START_FILES=3D'pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o' + LIB_STANDARD=3D'-lgcc -lc -lgcc $(CRTBEGIN_DIR)/crtend.o' + START_FILES=3D'pre-crt0.o $(CRT_DIR)/crt0.o $(CRTBEGIN_DIR)/crtbegin= .o' SYSTEM_TYPE=3Dberkeley-unix ;; =20 @@ -1019,14 +1025,17 @@ =20 dnl Not all platforms use crtn.o files. Check if the current one does. crt_files=3D +crtbegin_files=3D =20 for file in x $LIB_STANDARD $START_FILES; do case "$file" in *CRT_DIR*) crt_files=3D"$crt_files `echo $file | sed -e 's|.*/||'`" = ;; + *CRTBEGIN_DIR*) + crtbegin_files=3D"$crtbegin_files `echo $file | sed -e 's|.*/||'`"= ;; esac done =20 -if test "x$crt_files" !=3D x; then +if test "x$crt_files" !=3D x || test "x$crtbegin_files" !=3D x; then =20 ## If user specified a crt-dir, use that unconditionally. crt_gcc=3Dno @@ -1058,6 +1067,12 @@ =20 fi # CRT_DIR =3D "" =20 + crtbegin_gcc=3Dno + if test "X$CRTBEGIN_DIR" =3D X; then + CRTBEGIN_DIR=3D$CRT_DIR + crtbegin_gcc=3D$crt_gcc + fi + crt_missing=3D =20 for file in $crt_files; do @@ -1082,13 +1097,26 @@ test -e $CRT_DIR/$file || crt_missing=3D"$crt_missing $file" done # $crt_files =20 + dnl Same as above, but for crtbegin.o and crtend.o. + for file in $crtbegin_files; do + if test $crtbegin_gcc =3D yes && test ! -e "$CRTBEGIN_DIR/$file"; th= en + crt_file=3D`$CC --print-file-name=3D$file 2>/dev/null` + case "$crt_file" in + */*) CRTBEGIN_DIR=3D`AS_DIRNAME(["$crt_file"])` ;; + esac + fi + crtbegin_gcc=3Dno + test -e "$CRTBEGIN_DIR/$file" || crt_missing=3D"$crt_missing $file" + done + test "x$crt_missing" =3D x || \ AC_MSG_ERROR([Required file(s) not found:$crt_missing -Try using the --with-crt-dir option.]) +Try using the --with-crt-dir or --with-crtbegin-dir option.]) =20 -fi # crt_files !=3D "" +fi # crt_files !=3D "" || crtbegin_files !=3D= "" =20 AC_SUBST(CRT_DIR) +AC_SUBST(CRTBEGIN_DIR) =20 case $opsys in netbsd | openbsd ) @@ -1097,8 +1125,8 @@ test -f $CRT_DIR/crtn.o || \ AC_MSG_ERROR([Required file not found: crtn.o]) =20 - LIB_STANDARD=3D'-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/c= rtn.o' - START_FILES=3D'pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(= CRT_DIR)/crtbegin.o' + LIB_STANDARD=3D'-lgcc -lc -lgcc $(CRTBEGIN_DIR)/crtend.o $(CRT_D= IR)/crtn.o' + START_FILES=3D'pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(= CRTBEGIN_DIR)/crtbegin.o' fi ;; esac --- emacs-orig/src/Makefile.in +++ emacs/src/Makefile.in @@ -126,6 +126,7 @@ LIB_GCC=3D@LIB_GCC@ =20 CRT_DIR=3D@CRT_DIR@ +CRTBEGIN_DIR=3D@CRTBEGIN_DIR@ ## May use $CRT_DIR. LIB_STANDARD=3D@LIB_STANDARD@ START_FILES =3D @START_FILES@ ------cutting-here-may-damage-your-screen-surface----81848708------