Created attachment 194911 [details] Patch to ignore ${LOCALBASE}/include/uuid/uuid.h lang/python37 fails to build when misc/e2fsprogs-libuuid is installed. n file included from /usr/include/uuid.h:36: /usr/include/sys/uuid.h:80:21: error: typedef redefinition with different types ('struct uuid' vs 'unsigned char [16]') typedef struct uuid uuid_t; ^ /usr/local/include/uuid/uuid.h:44:23: note: previous definition is here typedef unsigned char uuid_t[16]; ^ In file included from /export/wrkdir/amd64/usr/ports/lang/python37/work/Python-3.7.0/Modules/_uuidmodule.c:8: /usr/include/uuid.h:51:9: error: conflicting types for 'uuid_compare' int32_t uuid_compare(const uuid_t *, const uuid_t *, uint32_t *); ^ /usr/local/include/uuid/uuid.h:73:5: note: previous declaration is here int uuid_compare(const uuid_t uu1, const uuid_t uu2); ^ 2 errors generated. This is because uuid_t defined in ${LOCALBASE}/include/uuid/uuid.h conflicts with uuid_t defined in /usr/include/sys/uuid.h.
Also of note is that it links to /usr/local/lib/libuuid.so.1 from misc/e2fsprogs-libuuid. test_uuid.py appears to pass ok. % python3.7 /usr/local/lib/python3.7/test/test_uuid.py ...ssss...s...ssss...s.........s.............s.... ---------------------------------------------------------------------- Ran 50 tests in 5.628s OK (skipped=12)
Confirm. I have the same issue.
Additionally, threads are not optional for Python3.7: configure: WARNING: unrecognized options: --with-threads
(In reply to rsmith from comment #3) Can you create a separate issue for this please
(In reply to Kubilay Kocak from comment #4) Done. See bug 230605.
Created attachment 196329 [details] additional patch to avoid linking libuuid In addition the "Patch to ignore ${LOCALBASE}/include/uuid/uuid.h", to avoid linking libuuid, some modification to setup.py is needed. As far as I've read Modules/_uuidmodule.c and Lib/uuid.py, those aren't use functions in libuuid comes from e2fsprogs-libuuid because it doesn't provide uuid_generate_time_safe().
Same issue at upstream (with pull request to fix it) https://bugs.python.org/issue34366
Yasuhito, it seems like your patch has been eaten by bugzilla, I can't fetch it. I suggest alternative 2 line solution which totally disables detection and usage of both uuid/uuid.h and libuuid.so. It's a shame this problem was has been lingering for months, I'm gonna treat this as maintainer timeout and commit it this year if there're no objections.
Maintainer timeout.
Created attachment 200603 [details] Simple 2 line solution to disable detection of both includes and libs from e2fsprocs-libuuid
(In reply to Dmitry Marakasov from comment #10) > Created attachment 200603 [details] > Simple 2 line solution to disable detection of both includes and libs from > e2fsprocs-libuuid (build succeeds on all supported FreeBSD versions both with and without e2fsprogs-libuuid present; test_uuid.py passes in both cases too; ldd shows that libuuid.so is not linked to _uuid.so).
(In reply to Dmitry Marakasov from comment #8) I have no objection. I'm glad if your patch will be commited. Thanks!
@Dmitry The main reason for the delay has been complete analysis of the issue and an understanding/confidence in the best approach to take with a long-term view of resolving the issue permanently (upstream). Additionally this issue is within a notoriously difficult and challenging class of "base vs local library conflicts" issues who's initial solutions have caused regressions elsewhere (eg: libintl, ssl, elementtree, expat issues in the poast). Lastly, is this an issue in other Python ports? If so, we want to solve this consistently across the board. That said, a two line patch to carry locally is fine if has been well QA tested, as it appears to be. Could you please add a comment above the new post-patch lines referencing this issue.
(In reply to Kubilay Kocak from comment #13) > Lastly, is this an issue in other Python ports? If so, we want to solve this consistently across the board. This is an issue to build _uuid module, which has been introduced in master prior Python 3.7, and not back ported, so it affects only Python >= 3.7. https://github.com/python/cpython/commit/a106aec2ed6ba171838ca7e6ba43c4e722bbecd1#diff-14e6a94abb7632d46e0716870d57ff4a https://github.com/python/cpython/pull/3796#issuecomment-338440114 (Please make sure Modules/_uuidmodule.c isn't exists on 3.6, 3.5, 3.4 and 2.7 branches)
A commit references this bug: Author: amdmi3 Date: Mon Dec 31 16:03:42 UTC 2018 New revision: 488798 URL: https://svnweb.freebsd.org/changeset/ports/488798 Log: - Fix build in presence of e2fsprogs-libuuid PR: 229562 Reported by: many Changes: head/lang/python37/Makefile