Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
clisp-2.49-r9 fails in configure phase but compiles manually
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
msst
Apprentice
Apprentice


Joined: 07 Jun 2011
Posts: 226

PostPosted: Tue Mar 13, 2018 7:21 pm    Post subject: clisp-2.49-r9 fails in configure phase but compiles manually Reply with quote

emerge -1av =dev-lisp/clisp-2.49-r9 fails with

Code:
checking whether we are cross compiling... configure: error: in `/var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.


and this is related to the following error in config.log:
Code:
configure:4070: gcc -o conftest -O2 -march=native -fomit-frame-pointer -pipe -fno-pie -Wa,--noexecstack  -I/usr/include/db4.8 -Wl,-O1 -Wl,--as-needed conftest.c  >&5
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/dev-lisp/clisp-2.49-r9/temp/ccksLT6Y.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
configure:4074: $? = 1
configure:4081: ./conftest
configure: line 4083: ./conftest: No such file or directory
configure:4085: $? = 127
configure:4092: error: in `/var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir':
configure:4096: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.


And the confusing thing is, if I go manually into the work directory and do a
Code:
./configure --prefix=/usr --libdir=/usr/lib64                --with-readline --with-unicode          --with-ffcall --without-dynamic-modules --with-threads=POSIX_THREADS --with-module=wildcard --with-module=rawsock --with-module=bindings/glibc --with-module=clx/new-clx --with-module=berkeley-db --with-module=dbus --with-module=gdbm --with-module=gtk2 --with-module=pcre --with-module=zlib --hyperspec=http://www.lispworks.com/reference/HyperSpec/ builddir


then it works. So it is just the emerge process screwing something up. Likely the environment of the ebuild process faulty?

Does anyone have an idea what is broken there and how to fix it?

I cannot force it to continue after manually configuring it also
Code:
ebuild /usr/portage/dev-lisp/clisp/clisp-2.49-r9.ebuild compile


as this gives

Code:
configure: loading cache config.cache
configure: error: `CFLAGS' was not set in the previous run
configure: error: `LDFLAGS' was not set in the previous run
configure: error: `CPPFLAGS' was not set in the previous run
configure: error: in `/var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm config.cache' and start over
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 22317
Location: here

PostPosted: Tue Mar 13, 2018 7:24 pm    Post subject: Reply with quote

https://bugs.gentoo.org/638514
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
msst
Apprentice
Apprentice


Joined: 07 Jun 2011
Posts: 226

PostPosted: Tue Mar 13, 2018 7:28 pm    Post subject: Reply with quote

Thanks, very annoying that this bug is still around.

I found the work-around here:
https://forums.gentoo.org/viewtopic-t-1073552-highlight-clisp.html

Code:
# echo -e "CFLAGS=\"\${CFLAGS} -no-pie\"\nCXXFLAGS=\"\${CXXFLAGS} -no-pie\"" > /etc/portage/env/nopie.conf
# echo "dev-lisp/clisp nopie.conf" >> /etc/portage/package.env
# emerge -1 clisp


now the configure runs through and the compile fails

Code:
gcc -O2 -march=native -fomit-frame-pointer -pipe -no-pie -fno-pie -Wa,--noexecstack -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -O -pthread -DENABLE_UNICODE -DMULTITHREAD -DPOSIX_THREADS -DDYNAMIC_FFI -I. -Wl,-O1 -Wl,--as-needed modules.o readline.o -lreadline -lncurses regexi.o libgnu_rx.a calls.o bogomips.o libgnu_sc.a -lm -lcrypt gettext.o lisp.a /usr/lib64/libreadline.so -lncurses -ldl /usr/lib64/libavcall.so /usr/lib64/libcallback.so -L/usr/lib64 -lsigsegv -L/usr/lib64 -lc libgnu_cl.a -o lisp.run
boot/lisp.run -B . -M boot/lispinit.mem -norc -q -i i18n/preload.lisp -i syscalls/preload.lisp -i regexp/preload.lisp -x (saveinitmem "base/lispinit.mem")
;; Loading file i18n/preload.lisp ...
;; Loaded file i18n/preload.lisp
;; Loading file syscalls/preload.lisp ...
;; Loaded file syscalls/preload.lisp
;; Loading file regexp/preload.lisp ...
;; Loaded file regexp/preload.lisp
;; Wrote the memory image into base/lispinit.mem (3,307,808 bytes)
Bytes permanently allocated:            176,512
Bytes currently in use:               3,121,752
Bytes available until next GC:          776,358
3121752 ;
776358 ;
176512 ;
1 ;
237864 ;
6688
base/lisp.run -B . -M base/lispinit.mem -norc -q -i i18n/i18n -i syscalls/posix -i regexp/regexp -i readline/readline -x (saveinitmem "base/lispinit.mem")
;; Loading file /var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/i18n/i18n.fas ...
;; Loaded file /var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/i18n/i18n.fas
;; Loading file /var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/syscalls/posix.fas ...
;; Loaded file /var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/syscalls/posix.fas
;; Loading file /var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/regexp/regexp.fas ...
;; Loaded file /var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/regexp/regexp.fas
;; Loading file /var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/readline/readline.fas ...
*** - FFI::FIND-FOREIGN-VARIABLE: foreign variable #<FOREIGN-VARIABLE "rl_readline_state" #x000000000088B540> does not have the required size or alignment


...what a mess!
Back to top
View user's profile Send private message
msst
Apprentice
Apprentice


Joined: 07 Jun 2011
Posts: 226

PostPosted: Tue Mar 13, 2018 7:49 pm    Post subject: Reply with quote

P.S.:

And this problem could again be circumvented by just unmasking and emerging the development version of clisp:

dev-lisp/clisp-2.49.90::gentoo

does compile, so the bug is in the stable package.
Back to top
View user's profile Send private message
tayirvadai
n00b
n00b


Joined: 15 Oct 2017
Posts: 21

PostPosted: Thu Mar 21, 2019 2:31 am    Post subject: Reply with quote

Compilation error occurred as well on this. I was able to circumvent the initial configure problem with the help of env as suggested, but the code compilation failed. and it looks like the clisp.h (not sure the one directly present or the linkkit config.h is missing an entry of the newly added item. or make file is not properly present. Any help is appreciated.

Code:
-with-readline --with-unicode;\
    else \
      /bin/sh $m/configure --srcdir=$m --disable-option-checking --with-readline --with-unicode; \
    fi ) ;\
fi; \
test -f $m/Makefile -a $m/Makefile -nt bindings/glibc/Makefile && sed "s,srcdir = .,srcdir = $m," "$m/Makefile" > bindings/glibc/Makefile ; \
CLISP="/var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/clisp -K boot  -E UTF-8 -Epathname 1:1 -Emisc 1:1 -norc" ; \
cd bindings/glibc ; make clisp-module CC="gcc" CPPFLAGS="-I/usr/include/db4.8  -I/var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/gllib -I/var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir" CFLAGS="-march=native -O2 -pipe -no-pie -fno-pie -Wa,--noexecstack -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -O -DENABLE_UNICODE -DDYNAMIC_FFI -I." CLFLAGS="-Wl,-O1 -Wl,--as-needed " LIBS="/usr/lib64/libreadline.so -lncurses -ldl /usr/lib64/libavcall.so /usr/lib64/libcallback.so  -L/usr/lib64 -lsigsegv -L/usr/lib64 -lc libgnu_cl.a" RANLIB="ranlib" CLISP="$CLISP -q" SHREXT=.so
make[1]: Entering directory '/var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/bindings/glibc'
/var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/clisp -K boot  -E UTF-8 -Epathname 1:1 -Emisc 1:1 -norc -q -c /var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/modules/bindings/glibc/linux.lisp -o ./
;; Compiling file /var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/modules/bindings/glibc/linux.lisp ...
;; Wrote file /var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/bindings/glibc/linux.fas
;; Wrote file /var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/bindings/glibc/linux.c
0 errors, 0 warnings
gcc -I/usr/include/db4.8  -I/var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/gllib -I/var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir -march=native -O2 -pipe -no-pie -fno-pie -Wa,--noexecstack -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -O -DENABLE_UNICODE -DDYNAMIC_FFI -I. -I$(/var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/clisp -K boot  -E UTF-8 -Epathname 1:1 -Emisc 1:1 -norc -q -b)/linkkit -c linux.c
linux.c: In function ‘module__linux__init_function_2’:
linux.c:680:37: error: ‘cfree’ undeclared (first use in this function); did you mean ‘free’?
   register_foreign_function((void*)&cfree,"cfree",1024);
                                     ^~~~~
                                     free
linux.c:680:37: note: each undeclared identifier is reported only once for each function it appears in
linux.c:966:3: warning: ‘readdir_r’ is deprecated [-Wdeprecated-declarations]
   register_foreign_function((void*)&readdir_r,"readdir_r",1024);
   ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from linux.c:23:
/usr/include/dirent.h:183:12: note: declared here
 extern int readdir_r (DIR *__restrict __dirp,
            ^~~~~~~~~
linux.c:967:3: warning: ‘readdir64_r’ is deprecated [-Wdeprecated-declarations]
   register_foreign_function((void*)&readdir64_r,"readdir64_r",1024);
   ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from linux.c:23:
/usr/include/dirent.h:201:12: note: declared here
 extern int readdir64_r (DIR *__restrict __dirp,
            ^~~~~~~~~~~
make[1]: *** [Makefile:28: linux.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-lisp/clisp-2.49-r9/

_________________
Thanks
Tayirvadai
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 22317
Location: here

PostPosted: Thu Mar 21, 2019 6:50 am    Post subject: Reply with quote

You can post your emerge --info?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
tayirvadai
n00b
n00b


Joined: 15 Oct 2017
Posts: 21

PostPosted: Fri Mar 22, 2019 1:37 am    Post subject: Reply with quote

dev-lisp/clisp-2.49.92 compiled well. It was using the 2.49-r9 which was the stable version. Forcing it to that version compiled. will test and let you know. thanks for the suggestions.
_________________
Thanks
Tayirvadai
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum