﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	difficulty
1196	Static compilation doesn't respect $LIBDIR.	evhan		"Reported by Enigmatic_Fellow in #chicken.

After building CHICKEN with a nonstandard {{{$LIBDIR}}}:

{{{
# CHICKEN built with LIBDIR=/usr/local/lib64
$ csc -verbose foo.scm                                                                                                                            
'/usr/local/bin/chicken' 'foo.scm' -output-file 'foo.c' -verbose
'gcc-4.6' 'foo.c' -o 'foo.o' -c  -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -g -Wall -Wno-unused -I""/usr/local/include/chicken""
rm foo.c
'gcc-4.6' 'foo.o' -o 'foo' -L""/usr/local/lib""  -Wl,-R""/usr/local/lib"" -lchicken -lm -ldl
rm foo.o
$ csc -static -verbose foo.scm                                                                                                                             
'/usr/local/bin/chicken' 'foo.scm' -output-file 'foo.c' -feature chicken-compile-static -verbose
'gcc-4.6' 'foo.c' -o 'foo.o' -c  -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -g -Wall -Wno-unused -I""/usr/local/include/chicken""
rm foo.c
'gcc-4.6' 'foo.o' -o 'foo' -L""/usr/local/lib""  -Wl,-R""/usr/local/lib"" -static '/usr/local/lib/libchicken.a' -lm -ldl
gcc-4.6: error: /usr/local/lib/libchicken.a: No such file or directory

Error: shell command terminated with non-zero exit status 256: 'gcc-4.6' 'foo.o' -o 'foo' -L""/usr/local/lib""  -Wl,-R""/usr/local/lib"" -static '/usr/local/lib/libchicken.a' -lm -ldl
}}}

It seems the compiler passes {{{-static '/usr/local/lib/libchicken.a'}}} but should use {{{'/usr/local/lib64/libchicken.a'}}} instead.
"	defect	closed	major	someday	build system	4.9.x	worksforme			medium
