chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-janitors] #1429: "make check" requires installing first


From: Chicken Trac
Subject: [Chicken-janitors] #1429: "make check" requires installing first
Date: Sat, 02 Dec 2017 15:25:29 -0000

#1429: "make check" requires installing first
---------------------------------+-------------------------------
 Reporter:  sjamaan              |                 Owner:
     Type:  defect               |                Status:  new
 Priority:  major                |             Milestone:  5.0
Component:  compiler             |               Version:  4.12.0
 Keywords:  csc, static linking  |  Estimated difficulty:  medium
---------------------------------+-------------------------------
 When running "make check" while not having CHICKEN installed yet will, it
 will fail because we're referring directly to {{{libchicken.a}}} under the
 installation prefix's library dir.

 This is wrong in two ways: firstly, this means you can't run {{{make
 check}}} without installing first. Secondly, this means we're not testing
 the runtime of the CHICKEN being built, but that the CHICKEN which was
 previously installed to the same prefix.

 {{{
 $ rm -rf /home/sjamaan/chickens/chicken-5
 $ make check PREFIX=/home/sjamaan/chickens/chicken-5
 CHICKEN=/home/sjamaan/chickens/chicken-5-dbg/bin/chicken PLATFORM=linux
 ... lots of stuff elided...
 ======================================== linking tests ...
 /home/sjamaan/src/chicken-core/tests/../chicken
 'reverser/tags/1.0/reverser.scm' -output-file 'reverser.c' -verbose
 -include-path /home/sjamaan/src/chicken-core/tests/.. -unit reverser
 -emit-all-import-libraries
 generating import library `reverser.import.scm' for module `reverser' ...
 'gcc' 'reverser.c' -o 'reverser.o' -c  -fno-strict-aliasing -fwrapv
 -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer
 -I/home/sjamaan/src/chicken-core/tests/..
 -I/home/sjamaan/chickens/chicken-5/include/chicken
 rm reverser.c
 /home/sjamaan/src/chicken-core/tests/../chicken 'linking-tests.scm'
 -output-file 'a.c' -verbose -include-path /home/sjamaan/src/chicken-
 core/tests/.. -uses reverser
 'gcc' 'a.c' -o 'a.o' -c  -fno-strict-aliasing -fwrapv
 -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer
 -I/home/sjamaan/src/chicken-core/tests/..
 -I/home/sjamaan/chickens/chicken-5/include/chicken
 rm a.c
 'gcc' 'reverser.o' 'a.o' -o 'a.out' -L/home/sjamaan/src/chicken-
 core/tests/.. -L/home/sjamaan/chickens/chicken-5/lib
 -Wl,-R'/home/sjamaan/chickens/chicken-5/lib' -lchicken -lm -ldl
 rm a.o
 /home/sjamaan/src/chicken-core/tests/../chicken 'linking-tests.scm'
 -output-file 'a.c' -static -verbose -include-path /home/sjamaan/src
 /chicken-core/tests/.. -uses reverser -emit-link-file a.link
 'gcc' 'a.c' -o 'a.o' -c  -fno-strict-aliasing -fwrapv
 -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer
 -I/home/sjamaan/src/chicken-core/tests/..
 -I/home/sjamaan/chickens/chicken-5/include/chicken
 rm a.c
 'gcc' 'reverser.o' 'a.o' -o 'a.out' -L/home/sjamaan/src/chicken-
 core/tests/.. -L/home/sjamaan/chickens/chicken-5/lib
 -Wl,-R'/home/sjamaan/chickens/chicken-5/lib'
 /home/sjamaan/chickens/chicken-5/lib/libchicken.a -lm -ldl
 gcc: error: /home/sjamaan/chickens/chicken-5/lib/libchicken.a: No such
 file or directory

 Error: shell command terminated with non-zero exit status 256: 'gcc'
 'reverser.o' 'a.o' -o 'a.out' -L/home/sjamaan/src/chicken-core/tests/..
 -L/home/sjamaan/chickens/chicken-5/lib
 -Wl,-R'/home/sjamaan/chickens/chicken-5/lib'
 /home/sjamaan/chickens/chicken-5/lib/libchicken.a -lm -ldl
 rules.make:993: recipe for target 'check' failed
 make: *** [check] Error 1
 }}}

 I'm not sure what the correct fix would be for this. Currently the
 location really is hardcoded. I think we should be able to somehow rely on
 {{{gcc}}}'s library path when linking, but simply saying -lchicken makes
 it dynamically linked.

 Maybe we need an extra environment variable through which we can tell it
 where to find libraries, which when not specified falls back to the built-
 in PREFIX libdir?

--
Ticket URL: <https://bugs.call-cc.org/ticket/1429>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]