all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tomas Cech <tcech@suse.cz>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: luajit: Add -fPIC into CFLAGS.
Date: Tue, 16 Dec 2014 22:42:28 +0100	[thread overview]
Message-ID: <87wq5rw9tn.wl%tcech@suse.cz> (raw)
In-Reply-To: <87zjanpaku.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2767 bytes --]

At Tue, 16 Dec 2014 22:08:01 +0100,
Ludovic Courtès wrote:
> 
> Tomas Cech <sleep_walker@suse.cz> skribis:
> 
> > At Tue, 16 Dec 2014 18:08:10 +0100,
> > Ludovic Courtès wrote:
> >> 
> >> Tomáš Čech <sleep_walker@suse.cz> 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 #2: efl.scm --]
[-- Type: application/octet-stream, Size: 6038 bytes --]

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Tomáš Čech <sleep_walker@suse.cz>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages efl)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system cmake)
  #:use-module (gnu packages)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages curl)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages fribidi)
  #:use-module (gnu packages game-development)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages gnome)
  #:use-module (gnu packages gstreamer)
  #:use-module (gnu packages image)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages lua)
  #:use-module (gnu packages gl)
  #:use-module (gnu packages openssl)
  #:use-module (gnu packages pulseaudio)
  #:use-module (gnu packages photo)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages valgrind)
  #:use-module (gnu packages xorg))

(define-public efl
  (package
    (name "efl")
    (version "1.12.2")
    (source (origin
              (method url-fetch)
              (uri (string-append "http://download.enlightenment.org/rel/libs/efl/efl-" version ".tar.gz"))
              (sha256
               (base32 "1knxm4xiqxpvpszhyqik43lw36hdwdfh8z7y62803a7093j3yjnw"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("pkg-config" ,pkg-config)))
    (inputs
     `(("alsa-lib" ,alsa-lib)
       ("bash" ,bash)
       ("compositeproto" ,compositeproto)
       ("bullet" ,bullet)
       ("curl" ,curl)
       ("dbus" ,dbus)
       ("eudev" ,eudev)
       ("fontconfig" ,fontconfig)
       ("freetype" ,freetype)
       ("fribidi" ,fribidi)
       ("giflib" ,giflib)
       ("glib" ,glib)
       ("gstreamer" ,gstreamer)
       ("gst-plugins-base" ,gst-plugins-base)
;       ("gst-plugins-good" ,gst-plugins-good)
       ("libexif" ,libexif)
       ("libjpeg" ,libjpeg)
       ("libpng" ,libpng)
       ("librsvg" ,librsvg)
       ("libsndfile" ,libsndfile)
       ("libtiff" ,libtiff)
       ("libx11" ,libx11)
       ("libxcomposite" ,libxcomposite)
       ("libxcursor" ,libxcursor)
       ("libxdmcp" ,libxdmcp)
       ("libxext" ,libxext)
       ("libxi" ,libxi)
       ("libxkbfile" ,libxkbfile)
       ("libxinerama" ,libxinerama)
       ("libxp" ,libxp)
       ("libxrandr" ,libxrandr)
       ("libxscrnsaver" ,libxscrnsaver)
       ("libxtst" ,libxtst)
       ("luajit" ,luajit)
       ("mesa" ,mesa)
       ("openssl" ,openssl)
       ("printproto" ,printproto)
       ("pulseaudio" ,pulseaudio)
       ("scrnsaverproto" ,scrnsaverproto)
       ("util-linux" ,util-linux)
       ("valgrind" ,valgrind)
       ("xextproto" ,xextproto)
       ("xinput" ,xinput)
       ("xpr" ,xpr)
       ("xproto" ,xproto)))
;    (arguments
;     `(#:configure-flags '("--disable-static")))
    (arguments
     `(#:phases
       (alist-cons-before
        'configure 'patch-config-files
        (lambda _
          (substitute* "po/Makefile.in.in"
            (("/bin/sh") (which "bash"))))
        %standard-phases)))
    (home-page "http://www.enlightenment.org")
    (synopsis "Enlightenment Foundation Libraries")
    (description
     "EFL is toolkit used mainly for Enlightenment, but is used for more applications because it is resource friendly and energy efficient.")
    (license (list license:bsd-2 license:lgpl2.1 license:zlib)))) ; different parts under different licenses

(define-public elementary
  (package
    (name "elementary")
    (version "1.12.2")
    (source (origin
              (method url-fetch)
              (uri (string-append "http://download.enlightenment.org/rel/libs/elementary/elementary-" version ".tar.gz"))
              (sha256
               (base32 "0qjbhdhnw6h5zc05r2w2j38yapcv9km92k5spcw3zsdnc784vf5i"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("pkg-config" ,pkg-config)))
    (inputs
     `(
;       ("fribidi" ,fribidi)
;       ("libpng" ,libpng)
;       ("libx11" ,libx11)
;       ("libxinerama" ,libxinerama)
       ("efl" ,efl)))
;       ("openssl" ,openssl))))
;       ("zlib" ,zlib)))
    (home-page "http://www.enlightenment.org")
    (synopsis "Widget library of Enlightenment world")
    (description
     "EFL is toolkit used mainly for Enlightenment, but is used for more applications because it is resource friendly and energy efficient.")
    (license license:lgpl2.1)))

(define-public evas-generic-loaders
  (package
    (name "evas-generic-loaders")
    (version "1.12.0")
    (source (origin
              (method url-fetch)
              (uri (string-append "http://download.enlightenment.org/rel/libs/emotion_generic_players/emotion_generic_players-" version ".tar.gz"))
              (sha256
               (base32 "1nm0qbdkhrpgvmj5qn7l4jj5l1g4zz77bda0ddy67fqkn5h3qarg"))))
    (build-system gnu-build-system)
    (inputs
     `(("libx11" ,libx11)
       ("libxinerama" ,libxinerama)
       ("efl" ,efl)))
    (home-page "http://www.enlightenment.org")
    (synopsis "Widget library of Enlightenment world")
    (description
     "EFL is toolkit used mainly for Enlightenment, but is used for more applications because it is resource friendly and energy efficient.")
    (license license:lgpl2.1)))

  reply	other threads:[~2014-12-16 21:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15 22:52 [PATCH] gnu: luajit: Add -fPIC into CFLAGS Tomáš Čech
2014-12-16 17:08 ` Ludovic Courtès
2014-12-16 19:28   ` Tomas Cech
2014-12-16 21:08     ` Ludovic Courtès
2014-12-16 21:42       ` Tomas Cech [this message]
2014-12-16 22:15         ` Ludovic Courtès
2014-12-27 12:08           ` Tomas Cech
2015-01-07 20:14             ` Ludovic Courtès
2015-01-28 20:31               ` Tomas Cech
2015-02-01 14:43                 ` [PATCH] gnu: luajit: don't require ldconfig Tomáš Čech
2015-02-01 19:07                   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wq5rw9tn.wl%tcech@suse.cz \
    --to=tcech@suse.cz \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.