Re: Problems building GNU Prolog 1.2.19 on Debian GNU/Linux 3.1 (r1)

"Geoff Alexander" <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <004701c63d1b$cddcaa80$b900a8c0@alexander1>
Roberto,

GProlog 1.2.19 doesn't compile with gcc 4.x.x.  The work around is to use 
gcc 3.x.x.

Geoff Alexander

----- Original Message ----- 
From: "Roberto Bagnara" <[email protected]>
To: <[email protected]>
Sent: Monday, February 27, 2006 9:33 AM
Subject: Problems building GNU Prolog 1.2.19 on Debian GNU/Linux 3.1 (r1)


>
> Compilation aborts as follows:
>
> gplc -c -C '-O3 -fomit-frame-pointer' engine.c
> engine.c: In function 'Call_Prolog':
> engine.c:318: error: invalid lvalue in assignment
> engine.c:331: error: invalid lvalue in assignment
> engine.c: In function 'Call_Prolog_Next_Sol':
> engine.c:351: error: invalid lvalue in assignment
> engine.c:359: error: invalid lvalue in assignment
> engine.c: In function 'Keep_Rest_For_Prolog':
> engine.c:380: error: invalid lvalue in assignment
> engine.c:386: error: invalid lvalue in assignment
>
> A full log of configure + make is below the signature.
> Does anyone know how to fix it?
> Many thanks in advance,
>
>     Roberto
>
> -- 
> Prof. Roberto Bagnara
> Computer Science Group
> Department of Mathematics, University of Parma, Italy
> http://www.cs.unipr.it/~bagnara/
> mailto:[email protected]
>
>
> $ gcc -v
> Using built-in specs.
> Target: alphaev67-unknown-linux-gnu
> Configured with: ../gcc-4.0.2/configure --prefix=/usr/local
> Thread model: posix
> gcc version 4.0.2
> $ ./configure
> checking for gcc... gcc
> checking for C compiler default output... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ANSI C... none needed
> checking for ranlib... ranlib
> checking whether make sets $(MAKE)... yes
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether ln -s works... yes
> checking build system type... alphaev67-unknown-linux-gnu
> checking host system type... alphaev67-unknown-linux-gnu
> checking how to run the C preprocessor... gcc -E
> checking for egrep... grep -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking for long... yes
> checking size of long... 8
> checking sys/ioctl_compat.h usability... no
> checking sys/ioctl_compat.h presence... no
> checking for sys/ioctl_compat.h... no
> checking termios.h usability... yes
> checking termios.h presence... yes
> checking for termios.h... yes
> checking malloc.h usability... yes
> checking malloc.h presence... yes
> checking for malloc.h... yes
> checking for stdlib.h... (cached) yes
> checking for unistd.h... (cached) yes
> checking for getpagesize... yes
> checking for working mmap... yes
> checking for mprotect... yes
> checking for mallopt... yes
> checking for fgetc... yes
> checking for inline... inline
> checking for socket... yes
> checking for gethostbyname... yes
> DIRECTORIES
> --> Installation:       /usr/local/gprolog-1.2.19
> --> Link to binaries:   /usr/local/bin
> --> Documentation:      /usr/local/gprolog-1.2.19/doc
> --> HTML documentation: /usr/local/gprolog-1.2.19/doc/Html
> --> Examples:           /usr/local/gprolog-1.2.19
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating TopComp/Makefile
> config.status: creating Pl2Wam/Makefile
> config.status: creating Wam2Ma/Makefile
> config.status: creating Ma2Asm/Makefile
> config.status: creating Fd2C/Makefile
> config.status: creating Linedit/Makefile
> config.status: creating W32GUICons/Makefile
> config.status: creating EnginePl/Makefile
> config.status: creating BipsPl/Makefile
> config.status: creating EngineFD/Makefile
> config.status: creating BipsFD/Makefile
> config.status: creating Ma2Asm/FromC/Makefile
> config.status: creating Win32/Makefile
> config.status: creating Win32/gp-setup.iss
> config.status: creating EnginePl/gp_config.h
> config.status: EnginePl/gp_config.h is unchanged
> $ make
> (cd EnginePl; make config)
> make[1]: Entering directory 
> `/usr/local/distrib/gprolog-1.2.19/src/EnginePl'
> gcc -O3 -fomit-frame-pointer  -o pl_config pl_config.c
> ./pl_config
>
> -------------------------------
> --- GNU PROLOG INSTALLATION ---
> -------------------------------
>
> GNU Prolog version: 1.2.19 (Jun 13 2005)
> Operating system  : linux-gnu
> Processor         : alphaev67
> Size of a word    : 64 bits
> C compiler        : gcc
> C flags           : -O3 -fomit-frame-pointer
> C flags machine   :
> Loader flags      :
> Loader libraries  : -lm
> Use line editor   : Yes
> Use piped consult : Yes
> Use sockets       : Yes
> Use FD solver     : Yes
> Use machine regs. : Yes
> Used register(s)  : $9 $10 $11 $12 $13 $14
>
> ------------------------------
>
> (cd ../TopComp; make gplc)
> make[2]: Entering directory 
> `/usr/local/distrib/gprolog-1.2.19/src/TopComp'
> gcc -O3 -fomit-frame-pointer -o gplc top_comp.c -lm
> make[2]: Leaving directory `/usr/local/distrib/gprolog-1.2.19/src/TopComp'
> make[1]: Leaving directory 
> `/usr/local/distrib/gprolog-1.2.19/src/EnginePl'
> . ./SETVARS;for i in TopComp EnginePl Wam2Ma Ma2Asm Linedit BipsPl Pl2Wam 
> Fd2C EngineFD BipsFD;do (cd $i; make) || exit 1; done;\
> (cd TopComp; make gprolog)
> make[1]: Entering directory 
> `/usr/local/distrib/gprolog-1.2.19/src/TopComp'
> gcc -O3 -fomit-frame-pointer -o hexgplc hexfilter.c
> make[1]: Leaving directory `/usr/local/distrib/gprolog-1.2.19/src/TopComp'
> make[1]: Entering directory 
> `/usr/local/distrib/gprolog-1.2.19/src/EnginePl'
> gcc -O3 -fomit-frame-pointer  -o cpp_headers cpp_headers.c
> D=`(cd ..;for i in *;do test -d $i && X="$X 
> /usr/local/distrib/gprolog-1.2.19/src/$i";done;echo $X)`; ./cpp_headers 
> headers.h gprolog.h $D
> gplc -c -C '-O3 -fomit-frame-pointer' obj_begin.c
> gplc -c -C '-O3 -fomit-frame-pointer' obj_end.c
> gplc -c -C '-O3 -fomit-frame-pointer' machine.c
> gplc -c -C '-O3 -fomit-frame-pointer' machine1.c
> gplc -c -C '-O3 -fomit-frame-pointer' mem_alloc.c
> gplc -c -C '-O3 -fomit-frame-pointer' misc.c
> gplc -c -C '-O3 -fomit-frame-pointer' hash.c
> gplc -c -C '-O3 -fomit-frame-pointer' obj_chain.c
> gplc -c -C '-O3 -fomit-frame-pointer' engine.c
> engine.c: In function 'Call_Prolog':
> engine.c:318: error: invalid lvalue in assignment
> engine.c:331: error: invalid lvalue in assignment
> engine.c: In function 'Call_Prolog_Next_Sol':
> engine.c:351: error: invalid lvalue in assignment
> engine.c:359: error: invalid lvalue in assignment
> engine.c: In function 'Keep_Rest_For_Prolog':
> engine.c:380: error: invalid lvalue in assignment
> engine.c:386: error: invalid lvalue in assignment
> compilation failed
> make[1]: *** [engine.o] Error 1
> make[1]: Leaving directory 
> `/usr/local/distrib/gprolog-1.2.19/src/EnginePl'
> make: *** [all] Error 1
> $
>
>
> _______________________________________________
> Users-prolog mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/users-prolog
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.