guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] gnu: luajit: Add -fPIC into CFLAGS.


From: Tomas Cech
Subject: Re: [PATCH] gnu: luajit: Add -fPIC into CFLAGS.
Date: Tue, 16 Dec 2014 22:42:28 +0100
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/24.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

At Tue, 16 Dec 2014 22:08:01 +0100,
Ludovic Courtès wrote:
> 
> Tomas Cech <address@hidden> skribis:
> 
> > At Tue, 16 Dec 2014 18:08:10 +0100,
> > Ludovic Courtès wrote:
> >> 
> >> Tomáš Čech <address@hidden> skribis:
> >> 
> >> > * gnu/packages/lua.scm (luajit): Add -fPIC into CFLAGS and pass it to 
> >> > make.
> >> 
> >> [...]
> >> 
> >> > --- a/gnu/packages/lua.scm
> >> > +++ b/gnu/packages/lua.scm
> >> > @@ -92,7 +92,8 @@ for configuration, scripting, and rapid prototyping.")
> >> >      (arguments
> >> >       '(#:tests? #f                      ;luajit is distributed without 
> >> > tests
> >> >         #:phases (alist-delete 'configure %standard-phases)
> >> > -       #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs 
> >> > "out")))))
> >> > +       #:make-flags (list (string-append "CFLAGS=-fPIC " (or (getenv 
> >> > "CFLAGS") ""))
> >> > +                          (string-append "PREFIX=" (assoc-ref %outputs 
> >> > "out")))))
> >> 
> >> Could you add a comment explaining why this is needed?
> >
> > OK, I'll do. But I don't know details and linking during build of EFL
> > failed when this was missing. Is this level of explanation sufficient?
> 
> Interestingly luajit contains both a .so and a .a; src/Makefile has the
> rule to build .o files:
> 
> --8<---------------cut here---------------start------------->8---
> %.o: %.c
>       $(E) "CC        $@"
>       $(Q)$(TARGET_DYNCC) $(TARGET_ACFLAGS) -c -o $(@:.o=_dyn.o) $<
>       $(Q)$(TARGET_CC) $(TARGET_ACFLAGS) -c -o $@ $<
> --8<---------------cut here---------------end--------------->8---
> 
> Where $(TARGET_DYNCC) does use -fPIC.
> 
> So it all looks normal.  What’s the exact error you were getting when
> building EFL?

  CCLD     lib/ecore_ipc/libecore_ipc.la
ld: 
/gnu/store/ij22m0lalbagkm4fflnxc9691ax4bpvk-luajit-2.0.3/lib/libluajit-5.1.a(lj_err.o):
 relocation R_X86_64_32S against `.rodata' cannot be used when making a shared 
object; recompile with -fPIC
/gnu/store/ij22m0lalbagkm4fflnxc9691ax4bpvk-luajit-2.0.3/lib/libluajit-5.1.a: 
error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:16352: recipe for target 'lib/evas/libevas.la' failed
make[4]: *** [lib/evas/libevas.la] Error 1
make[4]: *** Waiting for unfinished jobs....
Makefile:31933: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
Makefile:11593: recipe for target 'all' failed
make[2]: *** [all] Error 2
Makefile:2284: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
Makefile:1514: recipe for target 'all' failed
make: *** [all] Error 2
phase `build' failed after 114 seconds

I attached current state of my efl.scm. Only efl was building correctly so far.

Thanks.

S_W

Attachment: efl.scm
Description: Binary data


reply via email to

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