Opened 11 years ago
Closed 3 years ago
#43594 closed defect (fixed)
xmlpatch @0.3.3: "check" should be a library dependency, not just a build dependency
Reported by: | cooljeanius (Eric Gallager) | Owned by: | twic@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.1 |
Keywords: | Cc: | ||
Port: | xmlpatch |
Description
I recently had to deactivate my installation of the "check" port to upgrade gstreamer1, because gstreamer1 has the following in its Portfile:
conflicts_build check
After doing this and installing another port, rev-upgrade then kicked in, and found that xmlpatch had been broken by the deactivation of "check":
---> Scanning binaries for linking errors Could not open /opt/local/lib/libcheck.0.dylib: Error opening or reading file (referenced from /opt/local/lib/tests/xml_diff/test-diff) DEBUG: Marking /opt/local/lib/tests/xml_diff/test-diff as broken DEBUG: Marking /opt/local/lib/tests/xml_diff/test-diff as broken
Just to confirm, the binary mentioned does actually come from xmlpatch:
$ port provides /opt/local/lib/tests/xml_diff/test-diff /opt/local/lib/tests/xml_diff/test-diff is provided by: xmlpatch
Running otool -L
manually confirms the linkage:
$ otool -L /opt/local/lib/tests/xml_diff/test-diff /opt/local/lib/tests/xml_diff/test-diff: /opt/local/lib/libcheck.0.dylib (compatibility version 1.0.0, current version 1.0.0) /opt/local/lib/libxmlpatch.0.dylib (compatibility version 1.0.0, current version 1.0.0) /opt/local/lib/libxmldiff.0.dylib (compatibility version 1.0.0, current version 1.0.0) /opt/local/lib/libxml2.2.dylib (compatibility version 12.0.0, current version 12.1.0) /opt/local/lib/libglib-2.0.0.dylib (compatibility version 3801.0.0, current version 3801.2.0) /opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.2.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
The build dependency that xmlpatch has on "check" should be updated to be a library dependency to reflect the fact that this linkage occurs. Either that or you could try linking "check" in statically only, or you could prevent the tests from being installed. Personally I would think that just changing the dependency style from depends_build
to depends_lib
would be easiest though.
(also, looking at the linkages, you should probably also add a library dependency on gettext, as well, for libintl, although that is not quite as important because so much other stuff depends on gettext that it is much less likely to get deactivated than "check" is, and also nm
says that xmlpatch does not actually use any symbols from libintl, even though it links against it...)
Change History (5)
comment:1 follow-up: 3 Changed 11 years ago by twic@…
comment:2 Changed 11 years ago by mf2k (Frank Schima)
Cc: | twic@… removed |
---|---|
Owner: | changed from macports-tickets@… to twic@… |
comment:3 Changed 4 years ago by cooljeanius (Eric Gallager)
Replying to twic@…:
It'd be nice to upgrade to version 0.4.0 as well, once the bugs are fixed.
If there's an update available, you might want to check the livecheck regex for it, too, as livecheck currently doesn't notice the update:
$ port -v livecheck xmlpatch Error: cannot check if xmlpatch was updated (regex didn't match) $
comment:4 Changed 3 years ago by cooljeanius (Eric Gallager)
I opened the following PR to do this: https://github.com/macports/macports-ports/pull/11695
Unfortunately, it runs into a build error:
/bin/sh ../libtool --tag=CC --mode=link /usr/bin/clang -I../src -I/opt/local/include/libxml2 -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -o xml_patch xml_patch-xml_patch_main.o ../src/libxmlpatch.la -L/opt/local/lib -lxml2 check_diff.c:243:21: warning: incompatible pointer types initializing 'void (*)(int)' with an expression of type 'const TTest *' (aka 'const struct TTest *') [-Wincompatible-pointer-types] {"test_1_to_2", test_12}, ^~~~~~~ check_diff.c:244:21: warning: incompatible pointer types initializing 'void (*)(int)' with an expression of type 'const TTest *' (aka 'const struct TTest *') [-Wincompatible-pointer-types] {"test_1_to_3", test_13}, ^~~~~~~ check_diff.c:245:21: warning: incompatible pointer types initializing 'void (*)(int)' with an expression of type 'const TTest *' (aka 'const struct TTest *') [-Wincompatible-pointer-types] {"test_1_to_4", test_14}, ^~~~~~~ check_diff.c:246:21: warning: incompatible pointer types initializing 'void (*)(int)' with an expression of type 'const TTest *' (aka 'const struct TTest *') [-Wincompatible-pointer-types] {"test_1_to_5", test_15}, ^~~~~~~ check_diff.c:247:21: warning: incompatible pointer types initializing 'void (*)(int)' with an expression of type 'const TTest *' (aka 'const struct TTest *') [-Wincompatible-pointer-types] {"test_2_to_1", test_21}, ^~~~~~~ check_diff.c:248:21: warning: incompatible pointer types initializing 'void (*)(int)' with an expression of type 'const TTest *' (aka 'const struct TTest *') [-Wincompatible-pointer-types] {"test_3_to_1", test_31}, ^~~~~~~ check_diff.c:249:21: warning: incompatible pointer types initializing 'void (*)(int)' with an expression of type 'const TTest *' (aka 'const struct TTest *') [-Wincompatible-pointer-types] {"test_4_to_1", test_41}, ^~~~~~~ check_diff.c:250:21: warning: incompatible pointer types initializing 'void (*)(int)' with an expression of type 'const TTest *' (aka 'const struct TTest *') [-Wincompatible-pointer-types] {"test_5_to_1", test_51}, ^~~~~~~ check_diff.c:251:22: warning: incompatible pointer types initializing 'void (*)(int)' with an expression of type 'const TTest *' (aka 'const struct TTest *') [-Wincompatible-pointer-types] {"test_from_to", test_from_to}, ^~~~~~~~~~~~ check_diff.c:252:22: warning: incompatible pointer types initializing 'void (*)(int)' with an expression of type 'const TTest *' (aka 'const struct TTest *') [-Wincompatible-pointer-types] {"test_to_from", test_to_from}, ^~~~~~~~~~~~ check_diff.c:253:23: warning: incompatible pointer types initializing 'void (*)(int)' with an expression of type 'const TTest *' (aka 'const struct TTest *') [-Wincompatible-pointer-types] {"test_n_0_to_1", test_n01}, ^~~~~~~~ check_diff.c:254:23: warning: incompatible pointer types initializing 'void (*)(int)' with an expression of type 'const TTest *' (aka 'const struct TTest *') [-Wincompatible-pointer-types] {"test_n_0_to_2", test_n02}, ^~~~~~~~ check_diff.c:255:23: warning: incompatible pointer types initializing 'void (*)(int)' with an expression of type 'const TTest *' (aka 'const struct TTest *') [-Wincompatible-pointer-types] {"test_n_2_to_0", test_n10}, ^~~~~~~~ check_diff.c:256:23: warning: incompatible pointer types initializing 'void (*)(int)' with an expression of type 'const TTest *' (aka 'const struct TTest *') [-Wincompatible-pointer-types] {"test_n_1_to_0", test_n20}, ^~~~~~~~ check_diff.c:243:21: error: initializer element is not a compile-time constant {"test_1_to_2", test_12}, ^~~~~~~ mv -f .deps/xml_diff-xml_diff_main.Tpo .deps/xml_diff-xml_diff_main.Po /bin/sh ../libtool --tag=CC --mode=link /usr/bin/clang -I../src -I../diff -I/opt/local/include/libxml2 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -o xml_diff xml_diff-xml_diff_main.o ../src/libxmlpatch.la ../diff/libxmldiff.la -L/opt/local/lib -lxml2 -L/opt/local/lib -lglib-2.0 -lintl -Wl,-framework -Wl,CoreFoundation check_diff.c:262:71: error: too many arguments to function call, expected 6, have 7 _tcase_add_test (tc, arr_tests[i].fn, arr_tests[i].name, 0, 0, 0, 1); ~~~~~~~~~~~~~~~ ^ /opt/local/include/check.h:347:27: note: '_tcase_add_test' declared here CK_DLL_EXP void CK_EXPORT _tcase_add_test(TCase * tc, const TTest * ttest, ^ 14 warnings and 2 errors generated. make[2]: *** [test_diff-check_diff.o] Error 1 make[2]: *** Waiting for unfinished jobs.... libtool: link: /usr/bin/clang -I../src -I/opt/local/include/libxml2 -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -Wl,-headerpad_max_install_names -Wl,-syslibroot -Wl,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -o .libs/xml_patch xml_patch-xml_patch_main.o -L/opt/local/lib ../src/.libs/libxmlpatch.dylib -lxml2 libtool: link: /usr/bin/clang -I../src -I../diff -I/opt/local/include/libxml2 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -Wl,-headerpad_max_install_names -Wl,-syslibroot -Wl,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -o .libs/xml_diff xml_diff-xml_diff_main.o -Wl,-framework -Wl,CoreFoundation -L/opt/local/lib ../src/.libs/libxmlpatch.dylib ../diff/.libs/libxmldiff.dylib /opt/local/var/macports/build/_Users_ericgallager_Documents_GitHub_macports-ports_textproc_xmlpatch/xmlpatch/work/libxmlpatch-0.3.3/src/.libs/libxmlpatch.dylib -lxml2 -lglib-2.0 -lintl make[2]: Leaving directory `/opt/local/var/macports/build/_Users_ericgallager_Documents_GitHub_macports-ports_textproc_xmlpatch/xmlpatch/work/libxmlpatch-0.3.3/tests' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/opt/local/var/macports/build/_Users_ericgallager_Documents_GitHub_macports-ports_textproc_xmlpatch/xmlpatch/work/libxmlpatch-0.3.3' make: *** [all] Error 2 make: Leaving directory `/opt/local/var/macports/build/_Users_ericgallager_Documents_GitHub_macports-ports_textproc_xmlpatch/xmlpatch/work/libxmlpatch-0.3.3' Command failed: cd "/opt/local/var/macports/build/_Users_ericgallager_Documents_GitHub_macports-ports_textproc_xmlpatch/xmlpatch/work/libxmlpatch-0.3.3" && /usr/bin/make -j16 -w all Exit code: 2 Error: Failed to build xmlpatch: command execution failed DEBUG: Error code: CHILDSTATUS 18845 2
Would updating fix this?
comment:5 Changed 3 years ago by reneeotten (Renee Otten)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to egall@…:
That's definitely the right fix. I'm not sure how to achieve it, though - i'll have to look into it.
This clearly also wants looking into. I suspect that libintl is a transitive dependency of something else; it may or may not actually be needed.
It'd be nice to upgrade to version 0.4.0 as well, once the bugs are fixed.