unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* LD_LIBRARY_PATH issues when compiling package
@ 2023-12-25 11:24 Alexander Asteroth
  2024-01-03  0:39 ` Ian Eure
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Asteroth @ 2023-12-25 11:24 UTC (permalink / raw)
  To: help-guix

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)))   
```


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-03  0:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-25 11:24 LD_LIBRARY_PATH issues when compiling package Alexander Asteroth
2024-01-03  0:39 ` Ian Eure

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).