Package Details: python-dlib 19.24.2-1

Git Clone URL: https://aur.archlinux.org/python-dlib.git (read-only, click to copy)
Package Base: python-dlib
Description: Dlib is a general purpose cross-platform C++ library designed using contract programming and modern C++ techniques.
Upstream URL: http://www.dlib.net/
Licenses: boost
Submitter: fzavan
Maintainer: petronny (AutoUpdateBot)
Last Packager: petronny
Votes: 14
Popularity: 0.051662
First Submitted: 2016-10-27 15:05 (UTC)
Last Updated: 2023-11-06 09:03 (UTC)

Pinned Comments

petronny commented on 2023-11-28 04:57 (UTC)

Prebuilt binaries of this package can be found in arch4edu.

Latest Comments

1 2 3 4 5 Next › Last »

Eeems commented on 2024-02-22 19:05 (UTC)

@ndoskrnl You seem to be mistaken, I'm not the maintainer, and it appears that this doesn't resolve the issue for some users.

Encrypt-Keeper commented on 2024-02-22 18:07 (UTC) (edited on 2024-02-22 18:10 (UTC) by Encrypt-Keeper)

I can confirm the issue with being unable to build due to the error generated with LTO version 12.0 instead of the expected 13.0 compilation terminated:

Uncommenting options=(!lto) in the PKGBUILD has no effect. Still fails with the same error.

Editing /etc/makepkg.conf and replacing OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge debug lto) with OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto)

Allowed me to successfully build the package.

songtianlun commented on 2024-02-22 06:21 (UTC)

Disabling LTO in /etc/makepkg.conf can resolve the issue of generated with LTO version 12.0 instead of the expected 13.0 compilation terminated:

- OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge debug lto)
+ OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge debug !lto)

coyotepunk05 commented on 2024-02-19 01:36 (UTC)

I am having the same issue with the LTO version. Uncommenting ##options=(!lto) does not make any difference. The package build still fails and gives the same error.

Has anyone found a way around this yet?

ndoskrnl commented on 2024-02-14 09:08 (UTC) (edited on 2024-02-14 09:13 (UTC) by ndoskrnl)

@MarsSeed I found the cause of issue by compare my system's '/etc/makepkg.conf' with the one in clean chroot. It shows that new version of pacman (as of 'core/pacman 6.0.2-9' now) makes option link time optimization enabled by default:

diff --text --unified --color=always /etc/makepkg.conf /mnt/chroots/arch/root/etc/makepkg.conf

@@ -92,7 +94,7 @@
 #-- debug:      Add debugging flags as specified in DEBUG_* variables
 #-- lto:        Add compile flags for building with link time optimization
 #
-OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto)
+OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge debug lto)

 #-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
 INTEGRITY_CHECK=(sha256)

Since the makedep 'cuda' is still using gcc-12 which will generate 'dlib_generated_cuda_dlib.cu.o' and 'dlib_generated_cusolver_dlibapi.cu.o':

readelf -p .comment /mnt/chroots/arch/extra-x86_64/ndoskrnl/build/python-dlib/src/dlib-19.24.2-cuda/build/temp.linux-x86_64-cpython-311/dlib_build/libdlib.a outputs

...
File: /mnt/chroots/arch/extra-x86_64/ndoskrnl/build/python-dlib/src/dlib-19.24.2-cuda/build/temp.linux-x86_64-cpython-311/dlib_build/libdlib.a(dlib_generated_cuda_dlib.cu.o)

String dump of section '.comment':
  [     1]  GCC: (GNU) 12.3.0


File: /mnt/chroots/arch/extra-x86_64/ndoskrnl/build/python-dlib/src/dlib-19.24.2-cuda/build/temp.linux-x86_64-cpython-311/dlib_build/libdlib.a(dlib_generated_cusolver_dlibapi.cu.o)

String dump of section '.comment':
  [     1]  GCC: (GNU) 12.3.0

So new installed systems will built python-dlib[-cuda] into fails at all due to different LTO version.

Therefore I recommend the maintainer @Eeems to uncomment the '##options=(!lto)' in file PKGBUILD default.

Eeems commented on 2024-02-12 06:45 (UTC) (edited on 2024-02-12 06:46 (UTC) by Eeems)

In case anybody is wondering, a fresh build using archlinux:latest with base-devel, and the required packages works with no issue. So something appears to be wrong with MarsSeed's system. If anybody else is having the same error, it would be helpful if you were to leave a comment as such, and if the solution provided here works: https://aur.archlinux.org/pkgbase/python-dlib#comment-945557

Eeems commented on 2024-02-12 00:55 (UTC)

@MarsSeed: No.

MarsSeed commented on 2024-02-12 00:01 (UTC)

@Eeems, please don't build it "on your system", but in a clean chroot environment.

Eeems commented on 2024-02-11 23:18 (UTC)

@MarsSeed I'm not sure why you are marking this as out-of-date. The package is at the latest upstream version for me. If you are having issues building the package, that's not the same as it being out-of-date.

On top of that, I can't replicate your error. A fresh build of the package works with no issue on my system.

MarsSeed commented on 2024-01-26 18:21 (UTC)

Fails to build (line #3 shows the cause of the error):

[100%] Linking CXX shared module 
    /tmp/makepkg/python-dlib/src/dlib-19.24.2-cuda/build/lib.linux-x86_64-cpython-311/_dlib_pybind11.cpython-311-x86_64-linux-gnu.so
lto1: fatal error: bytecode stream in file ‘dlib_build/libdlib.a’ generated with LTO version 12.0 instead of the expected 13.0
compilation terminated.
lto-wrapper: fatal error: /usr/bin/c++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/_dlib_pybind11.dir/build.make:522: 
    /tmp/makepkg/python-dlib/src/dlib-19.24.2-cuda/build/lib.linux-x86_64-cpython-311/_dlib_pybind11.cpython-311-x86_64-linux-gnu.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:118: CMakeFiles/_dlib_pybind11.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Traceback (most recent call last):
  File "/tmp/makepkg/python-dlib/src/dlib-19.24.2-cuda/setup.py", line 222, in <module>
    setup(
  File "/usr/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 963, in run_command
    super().run_command(command)
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 963, in run_command
    super().run_command(command)
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/tmp/makepkg/python-dlib/src/dlib-19.24.2-cuda/setup.py", line 134, in run
    self.build_extension(ext)
  File "/tmp/makepkg/python-dlib/src/dlib-19.24.2-cuda/setup.py", line 174, in build_extension
    subprocess.check_call(cmake_build, cwd=build_folder)
  File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j4']' returned non-zero exit 
    status 2.
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: python-dlib