Static Compile emacs 24.5 failed

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
zw963
Posts: 82
Joined: 13. Mar 2014, 18:36

Static Compile emacs 24.5 failed

Post by zw963 »

Hi, I want to Static Compile emacs 24.5, which used in my remote VPS.

Following is my process:

1. CFLAGS='-g3 -O2 -static' ./configure --with-x-toolkit=no --without-all

---------------------------------------
...
configure: error: The required function `tputs' was not found in any library.
The following libraries were tried (in order):
libtinfo, libncurses, libterminfo, libtermcap, libcurses
Please try installing whichever of these libraries is most appropriate
for your system, together with its header files.
For example, a libncurses-dev(el) or similar package.

-------------------------------------

But, seem like those library is exist in my salix, except libcurses.

libtinfo-5-x86_64-1alien [inst=yes]: libtinfo (symlinks to ncurses)
ncurses-5.9-x86_64-4 [inst=yes]: ncurses (CRT screen handling and optimization package)
ncurses-compat32-5.9-x86_64-4compat32 [inst=yes]: ncurses-compat32 (CRT screen handling and optimization package)
aaa_terminfo-5.9-x86_64-1 [inst=yes]: aaa_terminfo (a basic collection of terminfo entries)
libtermcap-1.2.3-x86_64-7 [inst=yes]: libtermcap (GNU termcap library)
libtermcap-compat32-1.2.3-x86_64-7compat32 [inst=yes]: libtermcap


Is there exist some issue?

Thanks
zw963
Posts: 82
Joined: 13. Mar 2014, 18:36

Re: Static Compile emacs 24.5 failed

Post by zw963 »

I try to reconfigure with following config, configure is passed.

CFLAGS='-g3 -O2 -static' ./configure --without-pop --without-kerberos --without-mmdf --without-sound --without-wide-int --without-xpm --without-jpeg --without-tiff --without-gif --without-png --without-rsvg --without-xml2 --without-imagemagick --without-xft --without-libotf --without-m17n-flt --without-xaw3d --without-xim --without-ns --without-gpm --without-dbus --without-gconf --without-gsettings --without-selinux --without-gnutls --without-x

But make is failed.

------------------------

gcc -Demacs -I. -I. -I../lib -I./../lib -MMD -MF deps/.d -MP -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -g3 -O2 -static -Wl,-znocombreloc \
-o temacs vm-limit.o dispnew.o frame.o scroll.o xdisp.o menu.o window.o charset.o coding.o category.o ccl.o character.o chartab.o bidi.o cm.o term.o terminal.o xfaces.o emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o font.o print.o lread.o syntax.o unexelf.o bytecode.o process.o gnutls.o callproc.o region-cache.o sound.o atimer.o doprnt.o intervals.o textprop.o composite.o xml.o gfilenotify.o profiler.o decompress.o terminfo.o lastfile.o ../lib/libgnu.a -lacl -lrt -ltermcap -lpthread -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lm -lz
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libtermcap.a(tparam.o): In function `tparam':
tparam.c:(.text+0x488): multiple definition of `tparam'
terminfo.o:/home/zw963/Downloads/emacs-24.5/emacs-24.5/src/terminfo.c:43: first defined here
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lgio-2.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lgobject-2.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lglib-2.0
dired.o: In function `Fsystem_groups':
/home/zw963/Downloads/emacs-24.5/emacs-24.5/src/dired.c:1055: warning: Using 'getgrent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
sysdep.o: In function `system_process_attributes':
/home/zw963/Downloads/emacs-24.5/emacs-24.5/src/sysdep.c:2927: warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libacl.a(acl_from_text.o): In function `acl_from_text':
(.text+0x5e2): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
dired.o: In function `Fsystem_groups':
/home/zw963/Downloads/emacs-24.5/emacs-24.5/src/dired.c:1058: warning: Using 'endgrent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
dired.o: In function `Fsystem_users':
/home/zw963/Downloads/emacs-24.5/emacs-24.5/src/dired.c:1035: warning: Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
fileio.o: In function `search_embedded_absfilename':
/home/zw963/Downloads/emacs-24.5/emacs-24.5/src/fileio.c:1725: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
sysdep.o: In function `system_process_attributes':
/home/zw963/Downloads/emacs-24.5/emacs-24.5/src/sysdep.c:2919: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
dired.o: In function `Fsystem_users':
/home/zw963/Downloads/emacs-24.5/emacs-24.5/src/dired.c:1038: warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
sysdep.o: In function `init_system_name':
/home/zw963/Downloads/emacs-24.5/emacs-24.5/src/sysdep.c:1391: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
process.o: In function `Fmake_network_process':
/home/zw963/Downloads/emacs-24.5/emacs-24.5/src/process.c:3081: warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
Makefile:664: recipe for target 'temacs' failed
make[1]: *** [temacs] Error 1
make[1]: Leaving directory '/home/zw963/Downloads/emacs-24.5/emacs-24.5/src'
Makefile:387: recipe for target 'src' failed
make: *** [src] Error 2

-----------------------------

BTW: default, ./configure && make is worked, only static compile is not work.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Static Compile emacs 24.5 failed

Post by mimosa »

Perhaps this may help:
http://ergoemacs.org/emacs/building_emacs_on_linux.html

You are probably missing some build dependencies.
zw963
Posts: 82
Joined: 13. Mar 2014, 18:36

Re: Static Compile emacs 24.5 failed

Post by zw963 »

mimosa wrote:Perhaps this may help:
http://ergoemacs.org/emacs/building_emacs_on_linux.html

You are probably missing some build dependencies.
Thanks, I think so too.

I have build emacs with those step in Ubuntu 12.04 successful (VirtualBox).
I tried in docker too, but because some special issue, not work.

this problem is resolved, only few package need build as static anywhy.
Post Reply