help-guix
[Top][All Lists]
Advanced

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

LD_LIBRARY_PATH issues when compiling package


From: Alexander Asteroth
Subject: LD_LIBRARY_PATH issues when compiling package
Date: Mon, 25 Dec 2023 12:24:12 +0100
User-agent: mu4e 1.10.8; emacs 29.1

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 via email to

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