#54 static library related build failure on Mac
Closed 8 months ago by midipix. Opened 9 months ago by RJVB.

Continuing from #46 which doesn't seem to be the culprit here:

VLC is one of the projects I've tried that fail to build when using rlibtool as a drop-in replacement for libtool. If I were to guess I'd say that the logic gets confused by the fact that VLC has an internal static library (libcompat.a), and starts to expect a dependency file for a hypothetical static version of a normal shared library of which I'm not even certain that VLC supports building.

It's huge, but I'm attaching an entire build log (done after doing a regular build with libtool followed by a make clean).
vlc2-build.log

The venom is at the tail:

/opt/local/bin/rlibtool  --tag=CC   --mode=link ccache /opt/local/bin/clang-mp-5.0  -O3 -march=native -g -mdynamic-no
-pic -arch x86_64 -D_INTL_REDIRECT_MACROS -I/Volumes/VMs/MPbuild/_Volumes_Debian_MP9_site-ports_multimedia_VLC2/VLC2/
work/vlc-2.2.8/contrib/include -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hidden -O3 -fno-math-errno -funsafe-math-optimizations -funroll-loops -fomit-frame-pointer -avoid-version -module -export-symbols-regex ^vlc_entry -shrext .dylib -no-undefined ../compat/libcompat.la ../src/libvlccore.la  -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/samba3 -arch x86_64 -Wl,-headerpad_max_install_names -L/Volumes/VMs/MPbuild/_Volumes_Debian_MP9_site-ports_multimedia_VLC2/VLC2/work/vlc-2.2.8/contrib/lib -o libattachment_plugin.la -rpath /opt/local/libexec/vlc2/lib/vlc/plugins/access access/attachment.lo  
rlibtool: lconf: {.name="libtool"}.
rlibtool: fdcwd: {.fdcwd=AT_FDCWD, .realpath="/Volumes/VMs/MPbuild/_Volumes_Debian_MP9_site-ports_multimedia_VLC2/VLC2/work/vlc-2.2.8/modules"}.
rlibtool: lconf: fstatat(AT_FDCWD,".",...) = 0 {.st_dev = 16777224, .st_ino = 2570501}.
rlibtool: lconf: openat(AT_FDCWD,"libtool",O_RDONLY,0) = -1 [ENOENT].
rlibtool: lconf: openat(AT_FDCWD,"../",O_DIRECTORY,0) = 6.
rlibtool: lconf: fstat(6,...) = 0 {.st_dev = 16777224, .st_ino = 2569145}.
rlibtool: lconf: openat(6,"libtool",O_RDONLY,0) = 7.
rlibtool: lconf: found "libtool".
rlibtool: link: ln -s libattachment_plugin.dylib.def .libs/libattachment_plugin.dylib.def.default
rlibtool: link: ln -s libattachment_plugin.dylib.def.default .libs/libattachment_plugin.dylib.def.host
rlibtool: link: ln -s /dev/null .libs/libattachment_plugin.a.disabled
rlibtool: link: ln -s libattachment_plugin.la .libs/libattachment_plugin.la.shrext.dylib
rlibtool: link: ln -s libattachment_plugin.la.shrext.dylib .libs/libattachment_plugin.la.shrext
rlibtool: error logged in slbt_get_deps_meta(), line 128: path not found: ../src/.libs/libvlccore.a.slibtool.deps.
rlibtool: < returned to > slbt_exec_link_create_library(), line 1452.
rlibtool: < returned to > slbt_exec_link(), line 2164.
make[4]: *** [libattachment_plugin.la] Error 2

sidebar: why does slbt_exec_link_adjust_argument_vector() emit --whole-archive when fwholearchive is false?

Continuing from #46 which doesn't seem to be the culprit here:

VLC is one of the projects I've tried that fail to build when using rlibtool as a drop-in replacement for libtool. If I were to guess I'd say that the logic gets confused by the fact that VLC has an internal static library (libcompat.a), and starts to expect a dependency file for a hypothetical static version of a normal shared library of which I'm not even certain that VLC supports building.

It's huge, but I'm attaching an entire build log (done after doing a regular build with libtool followed by a make clean).
vlc2-build.log

The venom is at the tail:

/opt/local/bin/rlibtool --tag=CC --mode=link ccache /opt/local/bin/clang-mp-5.0 -O3 -march=native -g -mdynamic-no -pic -arch x86_64 -D_INTL_REDIRECT_MACROS -I/Volumes/VMs/MPbuild/_Volumes_Debian_MP9_site-ports_multimedia_VLC2/VLC2/ work/vlc-2.2.8/contrib/include -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hidden -O3 -fno-math-errno -funsafe-math-optimizations -funroll-loops -fomit-frame-pointer -avoid-version -module -export-symbols-regex ^vlc_entry -shrext .dylib -no-undefined ../compat/libcompat.la ../src/libvlccore.la -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/samba3 -arch x86_64 -Wl,-headerpad_max_install_names -L/Volumes/VMs/MPbuild/_Volumes_Debian_MP9_site-ports_multimedia_VLC2/VLC2/work/vlc-2.2.8/contrib/lib -o libattachment_plugin.la -rpath /opt/local/libexec/vlc2/lib/vlc/plugins/access access/attachment.lo rlibtool: lconf: {.name="libtool"}. rlibtool: fdcwd: {.fdcwd=AT_FDCWD, .realpath="/Volumes/VMs/MPbuild/_Volumes_Debian_MP9_site-ports_multimedia_VLC2/VLC2/work/vlc-2.2.8/modules"}. rlibtool: lconf: fstatat(AT_FDCWD,".",...) = 0 {.st_dev = 16777224, .st_ino = 2570501}. rlibtool: lconf: openat(AT_FDCWD,"libtool",O_RDONLY,0) = -1 [ENOENT]. rlibtool: lconf: openat(AT_FDCWD,"../",O_DIRECTORY,0) = 6. rlibtool: lconf: fstat(6,...) = 0 {.st_dev = 16777224, .st_ino = 2569145}. rlibtool: lconf: openat(6,"libtool",O_RDONLY,0) = 7. rlibtool: lconf: found "libtool". rlibtool: link: ln -s libattachment_plugin.dylib.def .libs/libattachment_plugin.dylib.def.default rlibtool: link: ln -s libattachment_plugin.dylib.def.default .libs/libattachment_plugin.dylib.def.host rlibtool: link: ln -s /dev/null .libs/libattachment_plugin.a.disabled rlibtool: link: ln -s libattachment_plugin.la .libs/libattachment_plugin.la.shrext.dylib rlibtool: link: ln -s libattachment_plugin.la.shrext.dylib .libs/libattachment_plugin.la.shrext rlibtool: error logged in slbt_get_deps_meta(), line 128: path not found: ../src/.libs/libvlccore.a.slibtool.deps. rlibtool: < returned to > slbt_exec_link_create_library(), line 1452. rlibtool: < returned to > slbt_exec_link(), line 2164. make[4]: *** [libattachment_plugin.la] Error 2

That's kind of interesting. Can you please paste the output of:

$ ls -lia /Volumes/VMs/MPbuild/_Volumes_Debian_MP9_site-ports_multimedia_VLC2/VLC2/work/vlc-2.2.8/src

sidebar: why does slbt_exec_link_adjust_argument_vector() emit --whole-archive when fwholearchive is false?

The function-internal fwholearchive variable detects whether the command already contains an "active" -Wl,--whole-archive. When it is false, that means we need to add it; when it's true, that means it is already there and so we don't.

The function-internal fwholearchive variable detects whether the command already contains an "active" -Wl,--whole-archive. When it is false, that means we need to add it; when it's true, that means it is already there and so we don't.

Ah, yes. And you're only doing that when the entire archive has to be pulled in (e.g. when creating a shared library from it)? ;)
It could be tricky to adapt this to Apple's syntax but I guess I don't need to look beyond the presence of either "-all_load" or "-force_load" (without its argument) since you don't check if the archive being pulled in whole by the command is indeed the same as you'd be pulling in.

I'll paste the requested output later, but I can affirm that the file indeed isn't there. From memory, there is a file indicating that building the static version of the library is disabled.

That's kind of interesting. Can you please paste the output of:

$ ls -lia /Volumes/VMs/MPbuild/_Volumes_Debian_MP9_site-ports_multimedia_VLC2/VLC2/work/vlc-2.2.8/src

total 120
2570504 drwxr-xr-x 22 bertin admin   1462 Feb 12 14:48 .
2569145 drwxr-xr-x 21 bertin admin   1972 Feb 12 14:48 ..
2582540 drwxr-xr-x  2 bertin admin    238 Feb 12 14:48 .deps
6326539 drwxr-xr-x  2 bertin admin    612 Feb 12 14:48 .libs
2583660 -rw-r--r--  1 bertin admin 130485 Oct 27  2020 Makefile
2583661 -rw-r--r--  1 bertin admin  14403 Nov 21  2017 Makefile.am
2583662 -rw-r--r--  1 bertin admin 120325 Oct 27  2020 Makefile.in
2582542 drwxr-xr-x  3 bertin admin    238 Oct 27  2020 android
2582543 drwxr-xr-x  4 bertin admin    544 Feb 12 14:48 audio_output
2583663 -rwxr-xr-x  1 bertin admin    560 Jun 14  2014 check_headers
2582544 drwxr-xr-x  4 bertin admin    782 Feb 12 14:48 config
2582545 drwxr-xr-x  4 bertin admin    510 Feb 12 14:48 darwin
2582546 drwxr-xr-x  4 bertin admin    306 Feb 12 14:48 extras
2582547 drwxr-xr-x  4 bertin admin   2244 Feb 12 14:48 input
2582548 drwxr-xr-x  4 bertin admin    306 Feb 12 14:48 interface
2583664 -rw-r--r--  1 bertin admin 119284 Apr 13  2015 libvlc-module.c
6326551 -rw-r--r--  1 bertin admin    138 Feb 12 14:48 libvlc-module.lo
2583666 -rw-r--r--  1 bertin admin  21151 Nov 22  2015 libvlc.c
2583667 -rw-r--r--  1 bertin admin   6914 Nov 16  2014 libvlc.h
6326545 -rw-r--r--  1 bertin admin    124 Feb 12 14:48 libvlc.lo
2583669 -rw-r--r--  1 bertin admin    953 Mar  8  2017 libvlc_win32_rc.rc.in
6327375 -rw-r--r--  1 bertin admin    450 Feb 12 14:48 libvlccore.la
2583671 -rw-r--r--  1 bertin admin  11935 Nov 16  2014 libvlccore.sym
2582549 drwxr-xr-x  4 bertin admin   2380 Feb 12 14:48 misc
2583672 -rw-r--r--  1 bertin admin  10344 Nov 16  2014 missing.c
6326557 -rw-r--r--  1 bertin admin    126 Feb 12 14:48 missing.lo
2582550 drwxr-xr-x  4 bertin admin    544 Feb 12 14:48 modules
2582552 drwxr-xr-x  4 bertin admin    646 Feb 12 14:48 network
2582553 drwxr-xr-x  3 bertin admin    374 Oct 27  2020 os2
2582554 drwxr-xr-x  4 bertin admin   1190 Feb 12 14:48 playlist
2582555 drwxr-xr-x  4 bertin admin    680 Feb 12 14:48 posix
2583674 -rw-r--r--  1 bertin admin     44 Mar 13  2021 revision.c
6326563 -rw-r--r--  1 bertin admin    128 Feb 12 14:48 revision.lo
2583676 -rw-r--r--  1 bertin admin      8 Mar 13  2021 revision.txt
2582556 drwxr-xr-x  4 bertin admin    476 Feb 12 14:48 stream_output
2582557 drwxr-xr-x  3 bertin admin    408 Oct 27  2020 test
2582558 drwxr-xr-x  4 bertin admin    612 Feb 12 14:48 text
2583677 -rw-r--r--  1 bertin admin   2071 Jun 14  2014 version.c
6326569 -rw-r--r--  1 bertin admin    126 Feb 12 14:48 version.lo
2582559 drwxr-xr-x  4 bertin admin   1462 Feb 12 14:48 video_output
6327385 -rw-r--r--  1 bertin admin    718 Feb 12 14:48 vlc-plugin.pc
2583680 -rw-r--r--  1 bertin admin    612 Jun 14  2014 vlc-plugin.pc.in
2582560 drwxr-xr-x  3 bertin admin    408 Oct 27  2020 win32

Bonus:

> find vlc-2.2.8/ -name "lib*.*" | xargs ll -trd | fgrep 'Feb 12'
-rw-r--r--  1 bertin  admin      449 Feb 12 14:48 vlc-2.2.8//compat/libcompat.la
lrwxr-xr-x  1 bertin  admin        9 Feb 12 14:48 vlc-2.2.8//compat/.libs/libcompat.so.disabled -> /dev/null
lrwxr-xr-x  1 bertin  admin       24 Feb 12 14:48 vlc-2.2.8//compat/.libs/libcompat.so.def.host -> libcompat.so.def.default
lrwxr-xr-x  1 bertin  admin       16 Feb 12 14:48 vlc-2.2.8//compat/.libs/libcompat.so.def.default -> libcompat.so.def
lrwxr-xr-x  1 bertin  admin        9 Feb 12 14:48 vlc-2.2.8//compat/.libs/libcompat.so.def -> /dev/null
lrwxr-xr-x  1 bertin  admin       15 Feb 12 14:48 vlc-2.2.8//compat/.libs/libcompat.lai -> ../libcompat.la
lrwxr-xr-x  1 bertin  admin       15 Feb 12 14:48 vlc-2.2.8//compat/.libs/libcompat.la -> ../libcompat.la
-rw-r--r--  1 bertin  admin      143 Feb 12 14:48 vlc-2.2.8//compat/.libs/libcompat.a.slibtool.deps
-rw-r--r--  1 bertin  admin    24184 Feb 12 14:48 vlc-2.2.8//compat/.libs/libcompat.a
-rw-r--r--  1 bertin  admin      124 Feb 12 14:48 vlc-2.2.8//src/libvlc.lo
-rw-r--r--  1 bertin  admin      138 Feb 12 14:48 vlc-2.2.8//src/libvlc-module.lo
-rw-r--r--  1 bertin  admin    39148 Feb 12 14:48 vlc-2.2.8//src/.libs/libvlc.o
-rw-r--r--  1 bertin  admin   119664 Feb 12 14:48 vlc-2.2.8//src/.libs/libvlc-module.o
-rw-r--r--  1 bertin  admin    18634 Feb 12 14:48 vlc-2.2.8//src/.deps/libvlc.Plo
-rw-r--r--  1 bertin  admin    15876 Feb 12 14:48 vlc-2.2.8//src/.deps/libvlc-module.Plo
-rw-r--r--  1 bertin  admin      127 Feb 12 14:48 vlc-2.2.8//src/extras/libc.lo
-rw-r--r--  1 bertin  admin    11332 Feb 12 14:48 vlc-2.2.8//src/extras/.libs/libc.o
-rw-r--r--  1 bertin  admin    15306 Feb 12 14:48 vlc-2.2.8//src/extras/.deps/libc.Plo
lrwxr-xr-x  1 bertin  admin       27 Feb 12 14:48 vlc-2.2.8//src/.libs/libvlccore.so.slibtool.rpath -> /opt/local/libexec/vlc2/lib
lrwxr-xr-x  1 bertin  admin       25 Feb 12 14:48 vlc-2.2.8//src/.libs/libvlccore.so.def.host -> libvlccore.so.def.default
lrwxr-xr-x  1 bertin  admin       17 Feb 12 14:48 vlc-2.2.8//src/.libs/libvlccore.so.def.default -> libvlccore.so.def
lrwxr-xr-x  1 bertin  admin        9 Feb 12 14:48 vlc-2.2.8//src/.libs/libvlccore.a.disabled -> /dev/null
-rw-r--r--  1 bertin  admin      450 Feb 12 14:48 vlc-2.2.8//src/libvlccore.la
-rw-r--r--  1 bertin  admin      396 Feb 12 14:48 vlc-2.2.8//src/.libs/libvlccore.so.slibtool.deps
lrwxr-xr-x  1 bertin  admin        9 Feb 12 14:48 vlc-2.2.8//src/.libs/libvlccore.so.def -> /dev/null
-rwxr-xr-x  1 bertin  admin  1018816 Feb 12 14:48 vlc-2.2.8//src/.libs/libvlccore.so.8.0.1
lrwxr-xr-x  1 bertin  admin       19 Feb 12 14:48 vlc-2.2.8//src/.libs/libvlccore.so.8 -> libvlccore.so.8.0.1
lrwxr-xr-x  1 bertin  admin       19 Feb 12 14:48 vlc-2.2.8//src/.libs/libvlccore.so -> libvlccore.so.8.0.1
lrwxr-xr-x  1 bertin  admin       16 Feb 12 14:48 vlc-2.2.8//src/.libs/libvlccore.lai -> ../libvlccore.la
lrwxr-xr-x  1 bertin  admin       16 Feb 12 14:48 vlc-2.2.8//src/.libs/libvlccore.la -> ../libvlccore.la
lrwxr-xr-x  1 bertin  admin       23 Feb 12 14:48 vlc-2.2.8//modules/.libs/libattachment_plugin.la.shrext.dylib -> libattachment_plugin.la
lrwxr-xr-x  1 bertin  admin       36 Feb 12 14:48 vlc-2.2.8//modules/.libs/libattachment_plugin.la.shrext -> libattachment_plugin.la.shrext.dylib
-rw-r--r--  1 bertin  admin      286 Feb 12 14:48 vlc-2.2.8//modules/.libs/libattachment_plugin.dylib.slibtool.deps
lrwxr-xr-x  1 bertin  admin       38 Feb 12 14:48 vlc-2.2.8//modules/.libs/libattachment_plugin.dylib.def.host -> libattachment_plugin.dylib.def.default
lrwxr-xr-x  1 bertin  admin       30 Feb 12 14:48 vlc-2.2.8//modules/.libs/libattachment_plugin.dylib.def.default -> libattachment_plugin.dylib.def
lrwxr-xr-x  1 bertin  admin        9 Feb 12 14:48 vlc-2.2.8//modules/.libs/libattachment_plugin.a.disabled -> /dev/null

(2nd time a reply just disappears !@#$(&^W$%R()

Works, but I'll need to retype my description of the new regression >:(

Metadata Update from @RJVB:
- Issue status updated to: Closed (was: Open)

9 months ago

(2nd time a reply just disappears !@#$(&^W$%R()

Works, but I'll need to retype my description of the new regression >:(

Grrr, and I wasn't even in the right issue...

Metadata Update from @RJVB:
- Issue status updated to: Open (was: Closed)

9 months ago

(2nd time a reply just disappears !@#$(&^W$%R()

Happened to me too a couple of times ... for all I can tell tell, after being idle for that long the session will expire, and pagure doesn't seem to have a mechanism for restoring the draft after the user has signed in again. That being said, pagure has been working great for the community, so no biggie :=)

@RJVB Is this issue still current?

@RJVB -- to second @orbea, is still issue still current?

This issue has most likely already been fixed by several recent commits, the latest of which is b48cb77. Closing for now, but feel free to reopen as needed.

Metadata Update from @midipix:
- Issue status updated to: Closed (was: Open)

8 months ago

Login to comment on this ticket.

Metadata
Attachments 1
Attached 9 months ago View Comment