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

Build error #202

Closed
stefanhusmann opened this issue Apr 12, 2016 · 6 comments
Closed

Build error #202

stefanhusmann opened this issue Apr 12, 2016 · 6 comments

Comments

@stefanhusmann
Copy link

Under Arch Linux 64 bit the master branch does not compile since very recently.

TARGETLIB=pwd gcc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -Wl,--rpath=pwd -L. -Wl,-O1,--sort-common,--as-needed,-z,relro -Wl,--soname,libgauche-0.9.so.0.5 -shared -o libgauche-0.9.so box.o core.o vm.o compaux.o macro.o code.o error.o class.o prof.o collection.o boolean.o char.o string.o list.o hash.o treemap.o bits.o port.o write.o read.o vector.o weak.o symbol.o gloc.o compare.o regexp.o signal.o parameter.o module.o proc.o number.o bignum.o load.o paths.o lazy.o repl.o autoloads.o system.o compile.o libalpha.o libbool.o libchar.o libcode.o libcmp.o libdict.o libeval.o libexc.o libfmt.o libio.o liblazy.o liblist.o libmisc.o libmod.o libnum.o libobj.o libomega.o libproc.o librx.o libsrfis.o libstr.o libsym.o libsys.o libvec.o libgc_pic.a -latomic_ops -ldl -lcrypt -lutil -lrt -lm -lpthread
TARGETLIB=pwd /bin/bash ./makeverslink libgauche-0.9.so
./makeverslink: line 29: cd: /home/haawda/paketierung/meine_Pakete/gauche-git/pkg/gauche-git/home/haawda/paketierung/meine_Pakete/gauche-git/src/Gauche/src: No such file or directory
Makefile:346: recipe for target 'libgauche-0.9.so' failed
make[1]: *** [libgauche-0.9.so] Error 1
make[1]: Leaving directory '/home/haawda/paketierung/meine_Pakete/gauche-git/src/Gauche/src'
Makefile:39: recipe for target 'all' failed
make: *** [all] Error 1
==> ERROR: A failure occurred in build().
Aborting...

@shirok
Copy link
Owner

shirok commented Apr 13, 2016

The error message indicates $DESTDIR was messed up, although I can't recall anything I recently changed that affects it.
Could you give me the options you passed to configure? Find config.status in Gauche TOP_BUILDDIR and run it like ./config.status --config.

@stefanhusmann
Copy link
Author

that gives:

'--prefix=/usr' '--enable-multibyte=utf-8' '--enable-threads=pthreads' 'CC=gcc' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'

@shirok
Copy link
Owner

shirok commented Apr 13, 2016

Hmm, that doesn't look like suspicious. My guess is that somehow DESTDIR is unexpectedly set during the build (which should be set only when "make install").

Could you try this in Makefile.in and build from configure?

diff --git a/src/Makefile.in b/src/Makefile.in
index 8dd52e1..df5555a 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -81,7 +81,7 @@ LINK      = TARGETLIB=`pwd` $(CCLD) $(CFLAGS) $(RPATH_TMP) -L. $(LDFLAGS)
 RELINK    = TARGETLIB=$(TARGETLIB) $(CCLD) $(CFLAGS) $(RPATH_REAL) -L. $(LDFLAGS)
 INSTALL      = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
-POSTBUILD   = TARGETLIB=`pwd` $(MAKEVERSLINK) $(LIBGAUCHE).$(SOEXT)
+POSTBUILD   = TARGETLIB=`pwd` DESTDIR= $(MAKEVERSLINK) $(LIBGAUCHE).$(SOEXT)
 POSTINSTALL = TARGETLIB="$(TARGETLIB)" DESTDIR="$(DESTDIR)" $(MAKEVERSLINK) $(LIBGAUCHE).$(SOEXT)

 PRECOMP   = $(srcdir)/precomp -D LIBGAUCHE_BODY

@stefanhusmann
Copy link
Author

Indeed I set DESTDIR explicitely in the make-step. I removed it and tried
again, but the error remains. I will try your patch as soon as I am back on
my linux box.

-----Original-Nachricht-----
Betreff: Re: [shirok/Gauche] Build error (#202)
Datum: 2016-04-13T08:31:50+0200
Von: "Shiro Kawai" notifications@github.com
An: "shirok/Gauche" Gauche@noreply.github.com

Hmm, that doesn't look like suspicious. My guess is that somehow DESTDIR is
unexpectedly set during the build (which should be set only when "make
install").
Could you try this in Makefile.in and build from configure?

diff --git a/src/Makefile.in b/src/Makefile.in index 8dd52e1..df5555a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -81,7 +81,7 @@ LINK = TARGETLIB=pwd $(CCLD) $(CFLAGS) $(RPATH_TMP) -L. $(LDFLAGS) RELINK = TARGETLIB=$(TARGETLIB) $(CCLD) $(CFLAGS) $(RPATH_REAL) -L. $(LDFLAGS) INSTALL = @install@ INSTALL_DATA = @INSTALL_DATA@ -POSTBUILD = TARGETLIB=pwd $(MAKEVERSLINK) $(LIBGAUCHE).$(SOEXT) +POSTBUILD = TARGETLIB=pwd DESTDIR= $(MAKEVERSLINK) $(LIBGAUCHE).$(SOEXT) POSTINSTALL = TARGETLIB="$(TARGETLIB)" DESTDIR="$(DESTDIR)" $(MAKEVERSLINK) $(LIBGAUCHE).$(SOEXT) PRECOMP = $(srcdir)/precomp -D LIBGAUCHE_BODY


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#202 (comment)



@stefanhusmann
Copy link
Author

Your patch works. Thanks!

shirok added a commit that referenced this issue Apr 13, 2016
The makeverslink script refers to DESTDIR so that it can create
symlinks to the installed *.so, in case files are installed
under $DESTDIR for packaging.  The script also called during
build to create symlinks inside src/, at that point we assume
DESTDIR isn't set.  The assumption breaks if it is set externally.

This addresses #202
@shirok
Copy link
Owner

shirok commented Apr 13, 2016

Good!

@shirok shirok closed this as completed Apr 13, 2016
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

2 participants