* emacs build failure on today's debian
@ 2011-06-15 8:52 Miles Bader
2011-06-15 9:16 ` Julien Danjou
0 siblings, 1 reply; 11+ messages in thread
From: Miles Bader @ 2011-06-15 8:52 UTC (permalink / raw)
To: emacs-devel
$ make
...
make[1]: Entering directory `/usr/local/build/emacs/master/src'
make[1]: *** No rule to make target `/usr/lib/crt1.o', needed by `temacs'. Stop.
make[1]: Leaving directory `/usr/local/build/emacs/master/src'
make: *** [src] Error 2
make: Leaving directory `/usr/local/build/emacs/master'
$ locate crt1 | grep /usr/lib
/usr/lib/x86_64-linux-gnu/Mcrt1.o
/usr/lib/x86_64-linux-gnu/Scrt1.o
/usr/lib/x86_64-linux-gnu/crt1.o
/usr/lib/x86_64-linux-gnu/gcrt1.o
It seems pretty dodgy that Emacs is directly looking for these files at
all, but oh well, I guess it's some messiness related to dumping. If it
needs to use them, though, isn't there a less brittle way to find out
where they are?
For instance, this seems to work with gcc (starting with gcc 4.3):
$ gcc -print-file-name=crt1.o
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/../../../crt1.o
Thanks,
-Miles
--
Somebody has to do something, and it's just incredibly pathetic that it
has to be us. -- Jerry Garcia
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs build failure on today's debian
2011-06-15 8:52 emacs build failure on today's debian Miles Bader
@ 2011-06-15 9:16 ` Julien Danjou
2011-06-15 9:38 ` Miles Bader
2011-06-15 9:56 ` Bruce Stephens
0 siblings, 2 replies; 11+ messages in thread
From: Julien Danjou @ 2011-06-15 9:16 UTC (permalink / raw)
To: Miles Bader; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 467 bytes --]
On Wed, Jun 15 2011, Miles Bader wrote:
> It seems pretty dodgy that Emacs is directly looking for these files at
> all, but oh well, I guess it's some messiness related to dumping. If it
> needs to use them, though, isn't there a less brittle way to find out
> where they are?
You can fix it with passing this to configure:
--with-crt-dir=/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)/
--
Julien Danjou
❱ http://julien.danjou.info
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs build failure on today's debian
2011-06-15 9:16 ` Julien Danjou
@ 2011-06-15 9:38 ` Miles Bader
2011-06-15 9:50 ` Andreas Schwab
2011-06-15 16:09 ` Glenn Morris
2011-06-15 9:56 ` Bruce Stephens
1 sibling, 2 replies; 11+ messages in thread
From: Miles Bader @ 2011-06-15 9:38 UTC (permalink / raw)
To: emacs-devel
Julien Danjou <julien@danjou.info> writes:
>> It seems pretty dodgy that Emacs is directly looking for these files at
>> all, but oh well, I guess it's some messiness related to dumping. If it
>> needs to use them, though, isn't there a less brittle way to find out
>> where they are?
>
> You can fix it with passing this to configure:
>
> --with-crt-dir=/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)/
Right, that will work as a workaround right now, but I don't think users
should _have_ to do that, if it's possible for configure to figure it
out automatically.
So my question is really about the right way to do it for the future.
Thanks,
-Miles
--
My books focus on timeless truths. -- Donald Knuth
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs build failure on today's debian
2011-06-15 9:38 ` Miles Bader
@ 2011-06-15 9:50 ` Andreas Schwab
2011-06-15 16:09 ` Glenn Morris
1 sibling, 0 replies; 11+ messages in thread
From: Andreas Schwab @ 2011-06-15 9:50 UTC (permalink / raw)
To: Miles Bader; +Cc: emacs-devel
Miles Bader <miles@gnu.org> writes:
> So my question is really about the right way to do it for the future.
Make it work without pre-crt0.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs build failure on today's debian
2011-06-15 9:16 ` Julien Danjou
2011-06-15 9:38 ` Miles Bader
@ 2011-06-15 9:56 ` Bruce Stephens
2011-06-15 10:06 ` Julien Danjou
1 sibling, 1 reply; 11+ messages in thread
From: Bruce Stephens @ 2011-06-15 9:56 UTC (permalink / raw)
To: emacs-devel
Julien Danjou <julien@danjou.info> writes:
> On Wed, Jun 15 2011, Miles Bader wrote:
>
>> It seems pretty dodgy that Emacs is directly looking for these files at
>> all, but oh well, I guess it's some messiness related to dumping. If it
>> needs to use them, though, isn't there a less brittle way to find out
>> where they are?
>
> You can fix it with passing this to configure:
>
> --with-crt-dir=/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)/
That what at least one debian/rules does. I believe that now fails. On
this workstation, "dpkg-architecture -qDEB_HOST_MULTIARCH" produces
x86_64-linux-gnu but /usr/lib/x86_64-linux-gnu does not contain any crt
files (just liblouis.so, whatever that is).
brs% gcc -print-file-name=crt1.o
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/crt1.o
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs build failure on today's debian
2011-06-15 9:56 ` Bruce Stephens
@ 2011-06-15 10:06 ` Julien Danjou
0 siblings, 0 replies; 11+ messages in thread
From: Julien Danjou @ 2011-06-15 10:06 UTC (permalink / raw)
To: Bruce Stephens; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 624 bytes --]
On Wed, Jun 15 2011, Bruce Stephens wrote:
> That what at least one debian/rules does. I believe that now fails. On
> this workstation, "dpkg-architecture -qDEB_HOST_MULTIARCH" produces
> x86_64-linux-gnu but /usr/lib/x86_64-linux-gnu does not contain any crt
> files (just liblouis.so, whatever that is).
>
> brs% gcc -print-file-name=crt1.o
> /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/crt1.o
It works fine on Debian sid with libc6-dev installed.
If you're using stable/testing, there's no multiarch yet so you won't
see the problem anyhow.
--
Julien Danjou
❱ http://julien.danjou.info
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs build failure on today's debian
2011-06-15 9:38 ` Miles Bader
2011-06-15 9:50 ` Andreas Schwab
@ 2011-06-15 16:09 ` Glenn Morris
2011-06-16 4:14 ` Miles Bader
1 sibling, 1 reply; 11+ messages in thread
From: Glenn Morris @ 2011-06-15 16:09 UTC (permalink / raw)
To: Miles Bader; +Cc: emacs-devel
Miles Bader wrote:
> Right, that will work as a workaround right now, but I don't think users
> should _have_ to do that, if it's possible for configure to figure it
> out automatically.
I was told that it isn't:
https://bugs.launchpad.net/ubuntu/+source/emacs23/+bug/746510/comments/3
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs build failure on today's debian
2011-06-15 16:09 ` Glenn Morris
@ 2011-06-16 4:14 ` Miles Bader
2011-06-16 6:57 ` Glenn Morris
0 siblings, 1 reply; 11+ messages in thread
From: Miles Bader @ 2011-06-16 4:14 UTC (permalink / raw)
To: Glenn Morris; +Cc: emacs-devel
Glenn Morris <rgm@gnu.org> writes:
>> Right, that will work as a workaround right now, but I don't think users
>> should _have_ to do that, if it's possible for configure to figure it
>> out automatically.
>
> I was told that it isn't:
>
> https://bugs.launchpad.net/ubuntu/+source/emacs23/+bug/746510/comments/3
Er, but I actually mentioned a method that seems to work fine:
$ gcc -print-file-name=crt1.o
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/../../../crt1.o
As Andreas said, of course, the _real_ solution is to fix Emacs not to
explicitly reference crt1.o at all... but I assume that's a bigger change.
-Miles
--
Opposition, n. In politics the party that prevents the Goverment from running
amok by hamstringing it.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs build failure on today's debian
2011-06-16 4:14 ` Miles Bader
@ 2011-06-16 6:57 ` Glenn Morris
2011-06-16 7:18 ` Miles Bader
0 siblings, 1 reply; 11+ messages in thread
From: Glenn Morris @ 2011-06-16 6:57 UTC (permalink / raw)
To: Miles Bader; +Cc: emacs-devel
Miles Bader wrote:
> Er, but I actually mentioned a method that seems to work fine:
>
> $ gcc -print-file-name=crt1.o
> /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/../../../crt1.o
OK, great. Can you install something in configure.in that tries that
then (when GCC = yes and crt is not otherwise found).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs build failure on today's debian
2011-06-16 6:57 ` Glenn Morris
@ 2011-06-16 7:18 ` Miles Bader
2011-06-16 7:33 ` Glenn Morris
0 siblings, 1 reply; 11+ messages in thread
From: Miles Bader @ 2011-06-16 7:18 UTC (permalink / raw)
To: Glenn Morris; +Cc: emacs-devel
How's this? -miles
2011-06-16 Miles Bader <miles@gnu.org>
* configure.in: Try to determine CRT_DIR automatically when
using gcc.
diff --git a/configure.in b/configure.in
index 9e7ea85..60f7c4e 100644
--- a/configure.in
+++ b/configure.in
@@ -988,6 +988,21 @@ dnl Do this early because it can frob feature test macros for Unix-98 &c.
AC_SYS_LARGEFILE
+## If we're using gcc, and the user hasn't specified a crt-dir, try to
+## determine it automatically by asking gcc. [If this doesn't work,
+## CRT_DIR will remain empty and system-dependent code will be used
+## below.]
+##
+if test "x${GCC}y$CRT_DIR" = xyesy; then
+ crt_file=`$CC --print-file-name=crt1.o`
+ case "$crt_file" in
+ */*)
+ CRT_DIR=`AS_DIRNAME(["$crt_file"])`
+ ;;
+ esac
+fi
+
+
## If user specified a crt-dir, use that unconditionally.
if test "X$CRT_DIR" = "X"; then
--
Custard, n. A vile concoction produced by a malevolent conspiracy of the hen,
the cow, and the cook.
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: emacs build failure on today's debian
2011-06-16 7:18 ` Miles Bader
@ 2011-06-16 7:33 ` Glenn Morris
0 siblings, 0 replies; 11+ messages in thread
From: Glenn Morris @ 2011-06-16 7:33 UTC (permalink / raw)
To: Miles Bader; +Cc: emacs-devel
Nice (I did not know about AS_DIRNAME). Maybe add a "2> /dev/null" for
the $CC call? Personally I would have only asked gcc if the existing
system-dependent stuff failed to find crt, but doing it before is fine
too.
Miles Bader wrote:
> +## If we're using gcc, and the user hasn't specified a crt-dir, try to
> +## determine it automatically by asking gcc. [If this doesn't work,
> +## CRT_DIR will remain empty and system-dependent code will be used
> +## below.]
> +##
> +if test "x${GCC}y$CRT_DIR" = xyesy; then
> + crt_file=`$CC --print-file-name=crt1.o`
> + case "$crt_file" in
> + */*)
> + CRT_DIR=`AS_DIRNAME(["$crt_file"])`
> + ;;
> + esac
> +fi
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-06-16 7:33 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-15 8:52 emacs build failure on today's debian Miles Bader
2011-06-15 9:16 ` Julien Danjou
2011-06-15 9:38 ` Miles Bader
2011-06-15 9:50 ` Andreas Schwab
2011-06-15 16:09 ` Glenn Morris
2011-06-16 4:14 ` Miles Bader
2011-06-16 6:57 ` Glenn Morris
2011-06-16 7:18 ` Miles Bader
2011-06-16 7:33 ` Glenn Morris
2011-06-15 9:56 ` Bruce Stephens
2011-06-15 10:06 ` Julien Danjou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.