* Re: Building Emacs-trunk with gcc >= 4.5.1 and libelf installed
@ 2010-08-24 9:05 Angelo Graziosi
2010-08-24 9:29 ` Yaakov (Cygwin/X)
0 siblings, 1 reply; 4+ messages in thread
From: Angelo Graziosi @ 2010-08-24 9:05 UTC (permalink / raw
To: Cygwin, Emacs
Yaakov ,
thanks for clarifications and suggestions. I hope someone on the Emacs
list can recipie and apply them appropriately.
Emacs guys,
the simplest workaround I found to fix the issue was to add
#undef SVR4
in src/s/cygwin.h
Thanks,
Angelo.
Yaakov (Cygwin/X) wrote:
> On Tue, 2010-08-24 at 01:31 +0200, Angelo Graziosi wrote:
>> Trying to build Emacs-trunk on Cygwin with GCC >= 4.5.1, I have found a
>> problem if also the package 'libelf0' is installed.
> [snip]
>> and the following test in 'configure' script is true:
> [snip]
>> i.e. SVR4 is _defined_. But... 'src/xfaces.c' includes indirectly via
>> '/usr/include/X11/Xos.h' the header '/usr/include/X11/Xarch.h', which has:
> [snip]
>> i.e. finding SVR4 defined, it searches for 'byteorder.h' in
>> '/usr/include/sys' and not in '/usr/include/asm', where it lives (*as on
>> GNU/Linux*[1]), and this leads to the above failure.
>
> This is coming from autoconf's AC_FUNC_GETLOADAVG, which tries to find
> several different getloadavg(3) implementations (which Cygwin doesn't
> provide), otherwise it points to an AC_LIBOBJ from gnulib. On Solaris,
> the gnulib getloadavg uses kvm_open(3) and friends, and libkvm requires
> libelf, hence the check for the latter.
>
> AFAICS the proper solution is, in _AC_LIBOBJ_GETLOADAVG:
>
> if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes;
> then
> ac_have_func=yes
> AC_DEFINE(SVR4, 1, [Define to 1 on System V Release 4.])
> fi
>
> to add << && test "$ac_cv_lib_kvm_kvm_open" = yes >> to the conditional.
>
> In the meantime, since libelf isn't needed elsewhere in emacs, an easy
> workaround is to add "ac_cv_lib_elf_elf_begin=no" to CYGCONF_ARGS.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Building Emacs-trunk with gcc >= 4.5.1 and libelf installed
@ 2010-08-23 23:31 Angelo Graziosi
2010-08-24 4:37 ` Yaakov (Cygwin/X)
0 siblings, 1 reply; 4+ messages in thread
From: Angelo Graziosi @ 2010-08-23 23:31 UTC (permalink / raw
To: Cygwin; +Cc: Emacs
Trying to build Emacs-trunk on Cygwin with GCC >= 4.5.1, I have found a
problem if also the package 'libelf0' is installed.
The build fails in this way:
=====================================
./configure
[...]
checking for elf_begin in -lelf... yes
[...]
make
[...]
gcc-4.6...
In file included from /usr/include/X11/Xos.h:146:0,
from /tmp/emacs/src/xfaces.c:277:
/usr/include/X11/Xarch.h:43:30: fatal error: sys/byteorder.h: No such
file or directory
compilation terminated.
make[2]: *** [xfaces.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/tmp/emacs/Work/src'
make[1]: *** [src] Error 2
make[1]: Leaving directory '/tmp/emacs/Work'
make: *** [bootstrap] Error 2
=====================================
The issue is fixed, simply, if I uninstall 'libelf0'. Indeed...
If 'libelf0' is installed, we have from 'configure',
--------
checking for elf_begin in -lelf... yes
--------
and the following test in 'configure' script is true:
--------
if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
ac_have_func=yes
$as_echo "#define SVR4 1" >>confdefs.h
fi
--------
i.e. SVR4 is _defined_. But... 'src/xfaces.c' includes indirectly via
'/usr/include/X11/Xos.h' the header '/usr/include/X11/Xarch.h', which has:
--------
[...]
# if defined(SVR4) || defined(__SVR4)
# include <sys/byteorder.h>
# elif
[...]
--------
i.e. finding SVR4 defined, it searches for 'byteorder.h' in
'/usr/include/sys' and not in '/usr/include/asm', where it lives (*as on
GNU/Linux*[1]), and this leads to the above failure.
What does the Cygwin 'libelf0' maintainer think about these facts?
Thanks,
Angelo.
---
[1] Here Cygwin isn't different frome GNU/Linux Kubuntu 10.04. :-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Building Emacs-trunk with gcc >= 4.5.1 and libelf installed
2010-08-23 23:31 Angelo Graziosi
@ 2010-08-24 4:37 ` Yaakov (Cygwin/X)
0 siblings, 0 replies; 4+ messages in thread
From: Yaakov (Cygwin/X) @ 2010-08-24 4:37 UTC (permalink / raw
To: cygwin, emacs-devel
On Tue, 2010-08-24 at 01:31 +0200, Angelo Graziosi wrote:
> Trying to build Emacs-trunk on Cygwin with GCC >= 4.5.1, I have found a
> problem if also the package 'libelf0' is installed.
[snip]
> and the following test in 'configure' script is true:
[snip]
> i.e. SVR4 is _defined_. But... 'src/xfaces.c' includes indirectly via
> '/usr/include/X11/Xos.h' the header '/usr/include/X11/Xarch.h', which has:
[snip]
> i.e. finding SVR4 defined, it searches for 'byteorder.h' in
> '/usr/include/sys' and not in '/usr/include/asm', where it lives (*as on
> GNU/Linux*[1]), and this leads to the above failure.
This is coming from autoconf's AC_FUNC_GETLOADAVG, which tries to find
several different getloadavg(3) implementations (which Cygwin doesn't
provide), otherwise it points to an AC_LIBOBJ from gnulib. On Solaris,
the gnulib getloadavg uses kvm_open(3) and friends, and libkvm requires
libelf, hence the check for the latter.
AFAICS the proper solution is, in _AC_LIBOBJ_GETLOADAVG:
if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes;
then
ac_have_func=yes
AC_DEFINE(SVR4, 1, [Define to 1 on System V Release 4.])
fi
to add << && test "$ac_cv_lib_kvm_kvm_open" = yes >> to the conditional.
In the meantime, since libelf isn't needed elsewhere in emacs, an easy
workaround is to add "ac_cv_lib_elf_elf_begin=no" to CYGCONF_ARGS.
HTH,
Yaakov
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-08-24 9:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-24 9:05 Building Emacs-trunk with gcc >= 4.5.1 and libelf installed Angelo Graziosi
2010-08-24 9:29 ` Yaakov (Cygwin/X)
-- strict thread matches above, loose matches on Subject: below --
2010-08-23 23:31 Angelo Graziosi
2010-08-24 4:37 ` Yaakov (Cygwin/X)
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.