Skip to content

lib64 is not included in the path #47

Closed

Description

@grammy-jiang

When I build the portable python in the docker image of centos 7.9, I notice when I enable libffi or specify openssl 3.x, the libraries are generated and located in /build/deps/lib64. And this folder is not configured to read when compiling, so it is already failed.

I have checked the source code,and only find all of the lines which use lib are missing lib64, e.g.:

This potentially related with #41

Activity

  1. changed the title [-]/build/deps/lib64 is not included in the path[/-] [+]lib64 is not included in the path[/+] on Apr 9, 2024
  2. zsimic commented on Apr 9, 2024

    @zsimic
    Contributor

    Oh, don't know which part generates that, IIRC I only ever stated {build}/deps/lib (not lib64...).
    Hmm. Should we do something like this?

    lib64 = self.deps / "lib64"
    if lib64.exists():
        return lib64
    
    return self.deps / "lib"
    
  3. grammy-jiang commented on Apr 9, 2024

    @grammy-jiang
    ContributorAuthor

    Oh, don't know which part generates that, IIRC I only ever stated {build}/deps/lib (not lib64...). Hmm. Should we do something like this?

    lib64 = self.deps / "lib64"
    if lib64.exists():
        return lib64
    
    return self.deps / "lib"
    

    Only the libraries of libffi and openssl are in lib64, so we still need to keep lib for other dependencies.

    I did several tries about add lib64, but no lucky, the commit is here:

    My idea is to add lib64 to all lib appearance, but failed.

  4. grammy-jiang commented on Apr 9, 2024

    @grammy-jiang
    ContributorAuthor

    The deps folder structure becomes like this with libffi and openssl enabled in the docker image of centos 7.9:

    foo@bar:~$ /tmp# ls -l build/deps 
    total 12
    drwxr-xr-x.  2 root root 4096 Apr  9 05:14 bin
    drwxr-xr-x. 17 root root 4096 Apr  9 05:14 docs
    drwxr-xr-x.  7 root root  278 Apr  9 05:14 include
    drwxr-xr-x.  3 root root 4096 Apr  9 05:14 lib
    drwxr-xr-x.  4 root root  110 Apr  9 05:11 lib64
    drwxr-xr-x.  3 root root   18 Apr  9 05:09 man
    drwxr-xr-x.  5 root root   40 Apr  9 05:11 share
    foo@bar:~$ /tmp# ls -l build/deps/lib64 
    total 6576
    drwxr-xr-x. 2 root root       6 Apr  9 05:11 engines-1.1
    -rw-r--r--. 1 root root 5591940 Apr  9 05:11 libcrypto.a
    -rw-r--r--. 1 root root  106478 Apr  9 05:09 libffi.a
    -rwxr-xr-x. 1 root root     875 Apr  9 05:09 libffi.la
    -rw-r--r--. 1 root root 1026826 Apr  9 05:11 libssl.a
    drwxr-xr-x. 2 root root      61 Apr  9 05:11 pkgconfig
    

    The log message from build/logs/12-cpython.log:

    checking for openssl/ssl.h in /tmp/build/deps... yes
    checking whether compiling and linking against OpenSSL works... no
    checking for --with-ssl-default-suites... python
    

    if libffi is not selected, the libraries of openssl are saved in lib, and in the log message it is yes:

    checking whether compiling and linking against OpenSSL works... yes
    

    The configure in cpython about openssl check (I am not familiar with this file):

    I also found the log messages from build/logs/12-cpython.log:

    2024-04-10 09:08:43,993 INFO env CFLAGS_NODIST=-Wno-unused-command-line-argument
    2024-04-10 09:08:43,994 INFO env CPATH=build/deps/include:build/deps/include/ncursesw:build/deps/include/readline:build/deps/include/openssl:build/deps/include/uuid
    2024-04-10 09:08:43,994 INFO env LDFLAGS_NODIST=-Lbuild/deps/lib -Lbuild/deps/lib64 -Wl,-z,origin -Wl,-rpath=/ppp-marker/3.7.17/lib,-rpath=/ppp-marker/3.7.17/lib64
    2024-04-10 09:08:43,994 INFO env LD_LIBRARY_PATH=build/deps/lib:build/deps/lib64:/opt/rh/rh-python38/root/usr/lib64:/opt/rh/devtoolset-11/root/usr/lib64:/opt/rh/devtoolset-11/root/usr/lib:/opt/rh/devtoolset-11/root/usr/lib64/dyninst:/opt/rh/devtoolset-11/root/usr/lib/dyninst
    2024-04-10 09:08:43,994 INFO env PATH=build/deps/bin:/opt/rh/rh-python38/root/usr/local/bin:/opt/rh/rh-python38/root/usr/bin:/opt/rh/devtoolset-11/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin:/usr/bin:/bin
    2024-04-10 09:08:43,994 INFO env PKG_CONFIG_PATH=build/deps/lib/pkgconfig:build/deps/lib64/pkgconfig:/opt/rh/rh-python38/root/usr/lib64/pkgconfig:/opt/rh/devtoolset-11/root/usr/lib64/pkgconfig
    2024-04-10 09:08:43,995 INFO Created folder build/ppp-marker/3.7.17
    
  5. zsimic commented on Feb 14, 2025

    @zsimic
    Contributor

    Thank you for giving this a try. I build mostly on ubuntu and macos, and don't see lib64 there. Crossing fingers that #62 will solve it for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions