Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'./configure' clashes with _xtests #76

Open
edi-meier opened this issue Sep 2, 2013 · 6 comments
Open

'./configure' clashes with _xtests #76

edi-meier opened this issue Sep 2, 2013 · 6 comments

Comments

@edi-meier
Copy link

Not sure if I already mentioned it somewhere:
./aldor/aldor/test/Makefile.in
has
-Cargs="-Wconfig=$(aldorsrcdir)/aldor.conf
with _xtests.

If someone uses clang and/or e. g. -pie or other options via "./configure ..." suddenly one gets a
inherit = gcc
from aldor.conf, so a build might fail.

Sure, one could adapt "aldor.conf" before starting the build of aldor,
but maybe someone has a nicer idea.

@pippijn
Copy link
Collaborator

pippijn commented Sep 2, 2013

I'm probably in the minority (if not the only one) by saying I don't like unicl. I'm more in favour of having a slightly more complex build system (two steps: .as -> .c -> .o, as done in the axllib tests) than having a more complex compiler. I'd also agree with a compiler driver that wraps the actual compiler (like gcc).

@pbroadbery
Copy link
Member

To clarify, you're suggesting aldor is a wrapper which decides what needs
to be produced, then calls real-aldor, foam-to-c, cc and ld in order
(perhaps with nicer names)? No objections to that. unicl does fall between
being an aldor utility and looking like gcc, which does make modifying it
less pleasant.

The wrapper will still need to include something like unicl to cater for
varying cc implementations. Admittedly simpler, as there's no need for a
good number of the configurations.

@pbroadbery
Copy link
Member

What arguments did you give configure, and what was the full output from
make in the aldor/tests directory?

On Wed, Sep 11, 2013 at 8:17 PM, edi-meier [email protected] wrote:

At the moment I need actually 2 "aldor.conf"'s copied over
"../aldor/aldor/aldor/src/aldor.conf":
Before compilation:

[linuxclang]
inherit = linux
cc-name = clang
cc-opts = -O3
link-name = cc
link-opts = -L /usr/X11/lib -lgc

After compilation:

[linuxclang]
inherit = linux
cc-name = clang
cc-opts = -O3 -fPIE
link-name = cc
link-opts = -L /usr/X11/lib -lgc -pie

Otherwise I would get an
/usr/bin/ld.bfd.real:
./build/aldor/aldor/lib/libfoamlib/libfoamlib.a(character.o): relocation
R_X86_64_32S against `.bss' can not be used when making a shared object;
recompile with -fPIC
during compilation of
Exec: clang -L /usr/X11/lib -lgc -pie -I
./build/aldor/../../aldor/aldor/aldor/src -o enumtest.exe
enumtest-aldormain.o rtexns.o en0BQZ00.o ...


Reply to this email directly or view it on GitHubhttps://github.com//issues/76#issuecomment-24268123
.

@edi-meier
Copy link
Author

export CC=cc CFLAGS='-O3 -Wformat -Wformat-security -Werror=format-security -fstack-protector --param ssp-buffer-size=4 -fPIE' CPPFLAGS='-D_FORTIFY_SOURCE=2' LDFLAGS='-Wl,-z,relro -Wl,-z,now -pie'
../../data/aldor/aldor/configure --prefix=$HOME --with-boehm-gc --disable-java &> /dev/null ; echo $?
SysName: linuxclang
Exec: clang -L /usr/X11/lib -lgc -pie -I /home/edi/build/aldor/../../data/aldor/aldor/aldor/src -o enumtest.exe enumtest-aldormain.o rtexns.o en0BQZ00.o -L /home/edi/build/aldor/aldor/lib/libfoam -L /home/edi/build/aldor/aldor/lib/libfoamlib -L . -L /home/edi/build/aldor/aldor/src/../share/lib -L /home/edi/build/aldor/aldor/src/../lib -lfoamlib -lfoam -lm 
/usr/bin/ld.bfd.real: /home/edi/build/aldor/aldor/lib/libfoamlib/libfoamlib.a(character.o): relocation R_X86_64_32S against `.bss' can not be used when making a shared object; recompile with -fPIC
/home/edi/build/aldor/aldor/lib/libfoamlib/libfoamlib.a: could not read symbols: Bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@pbroadbery
Copy link
Member

What type of libraries are you trying to build, and what is the correct set
of options for compiling and linking aldor generated C?

Assuming we want aldor -fx to work with this configuration, it could be
added as either another configuration or replace the existing one. I've
never played with shared libraries/PIE stuff, so if someone could suggest
a reasonable set of supportable configurations, I'll go with it.

On Wed, Sep 11, 2013 at 9:11 PM, edi-meier [email protected] wrote:

export CC=cc CFLAGS='-O3 -Wformat -Wformat-security -Werror=format-security -fstack-protector --param ssp-buffer-size=4 -fPIE' CPPFLAGS='-D_FORTIFY_SOURCE=2' LDFLAGS='-Wl,-z,relro -Wl,-z,now -pie'
../../data/aldor/aldor/configure --prefix=$HOME --with-boehm-gc --disable-java &> /dev/null ; echo $?

SysName: linuxclang
Exec: clang -L /usr/X11/lib -lgc -pie -I /home/edi/build/aldor/../../data/aldor/aldor/aldor/src -o enumtest.exe enumtest-aldormain.o rtexns.o en0BQZ00.o -L /home/edi/build/aldor/aldor/lib/libfoam -L /home/edi/build/aldor/aldor/lib/libfoamlib -L . -L /home/edi/build/aldor/aldor/src/../share/lib -L /home/edi/build/aldor/aldor/src/../lib -lfoamlib -lfoam -lm
/usr/bin/ld.bfd.real: /home/edi/build/aldor/aldor/lib/libfoamlib/libfoamlib.a(character.o): relocation R_X86_64_32S against `.bss' can not be used when making a shared object; recompile with -fPIC
/home/edi/build/aldor/aldor/lib/libfoamlib/libfoamlib.a: could not read symbols: Bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Reply to this email directly or view it on GitHubhttps://github.com//issues/76#issuecomment-24272227
.

@edi-meier
Copy link
Author

Thanks a lot but since its only me no need for extra-work.
From a user standpoint maybe someone would expect that the ./configure-arguments would propagate into
aldor.conf (?)

I think I will just disable the "_xtests" again, especially since it seems that "libfoamlib" is just used for aldor/tests and not in the final distribution as also aldor/aldor/lib/libfoamlib/README explains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants