all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alexander Asteroth <alexander.asteroth@h-brs.de>
To: help-guix@gnu.org
Subject: LD_LIBRARY_PATH issues when compiling package
Date: Mon, 25 Dec 2023 12:24:12 +0100	[thread overview]
Message-ID: <871qbajyk6.fsf@h-brs.de> (raw)

Dear all,

I've had an installation of python3.{11,12} on my guix system that 
worked for a few months now, installed using a minimalistic 
package description (see [0] at the end of this post).
After updating my guix installation two days ago it stopped 
working whith weird `pip3` errors concerning `module '_ctypes' not 
found`.
Rolling back to the old environment didn't help. 

Trying to find out what caused the error I compiled python3.11.7 
in my home environment and noticed a warning that in fact the 
`_ctypes` module was disabled after compilation because the 
`libffi` library wasn't found (even thought it was installed).

Changing the configuration to:
```
$ ./configure --enable-optimizations --prefix="$HOME/.local/" 
LDFLAGS="-L$HOME/.guix-profile/lib"
```
did resolve the issue resulting in a working local installation.

Now I have basically three questions:

1. how can I advice the package build process (see [0]) to set the 
LDFLAGS correctly?
   (shouldn't this be done by adding `(input [...] libffi [...] )` 
   to the package description?)
2. how do programs in a guix system find the libraries (which 
reside in $HOME/.guix-profile/lib and in the store directories) 
anyway? 
3. does anybody have an idea what could have caused the library 
not to be found anymore after an update of the packages?
   (that even could not be resolved by rolling back to the old 
   environment of before the change)

Cheers and Merry Christmas

Alex

----

[0] python.scm:
```
(define-module (gyps packages python)
   [...] ;; cut out for brevity
)

(define-public python
  (package
   (name "python")
   (version "3.11.7")
   (source
    (origin
     (method url-fetch)
     (uri (string-append "https://www.python.org/ftp/python/"
                         version "/Python-" version ".tgz"))
     (sha256 (base32 
     "02cjn89mplkglgbsm5s9by7qaa1ii3x8sickpm0pdrb24bw0b306"))))
   (build-system gnu-build-system)
   (arguments '(#:tests? #f))
   (inputs
    (list bzip2
          expat
          gdbm
          libffi 
          sqlite 
          openssl
          readline
          zlib
          tcl
          tk))   
   (native-inputs
    `(("pkg-config" ,pkg-config)
      ("sitecustomize.py" ,(local-file (search-auxiliary-file
                                        "python/sitecustomize.py")))
      ))
   (home-page "https://www.python.org")
   (synopsis "High-level, dynamically-typed programming language")
   (description "[...]")
   (properties '((cpe-name . "python")))
   (license license:psfl)))   
```


             reply	other threads:[~2023-12-25 11:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-25 11:24 Alexander Asteroth [this message]
2024-01-03  0:39 ` LD_LIBRARY_PATH issues when compiling package Ian Eure

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=871qbajyk6.fsf@h-brs.de \
    --to=alexander.asteroth@h-brs.de \
    --cc=help-guix@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.