This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: _uuid module fails to compile on FreeBSD when libuuid is installed
Type: compile error Stage: patch review
Components: Extension Modules Versions: Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: mgorny
Priority: normal Keywords: patch

Created on 2018-08-09 06:48 by mgorny, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
dev-lang:python-3.7.0:20180809-062928.log mgorny, 2018-08-09 06:48 dev-lang:python-3.7.0:20180809-062928.log
Pull Requests
URL Status Linked Edit
PR 8711 open mgorny, 2018-08-09 07:26
Messages (1)
msg323317 - (view) Author: Michał Górny (mgorny) * Date: 2018-08-09 06:48
The _uuid extension fails to build on my Gentoo/FreeBSD system:

building '_uuid' extension
x86_64-gentoo-freebsd11.1-gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -pipe -march=native -fwrapv -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include -I. -I/var/tmp/portage/dev-lang/python-3.7.0/work/Python-3.7.0/Include -I/var/tmp/portage/dev-lang/python-3.7.0/work/Python-3.7.0 -c /var/tmp/portage/dev-lang/python-3.7.0/work/Python-3.7.0/Modules/_uuidmodule.c -o build/temp.freebsd-11.1-RELEASE-amd64-3.7/var/tmp/portage/dev-lang/python-3.7.0/work/Python-3.7.0/Modules/_uuidmodule.o
In file included from /usr/include/uuid.h:34:0,
                 from /var/tmp/portage/dev-lang/python-3.7.0/work/Python-3.7.0/Modules/_uuidmodule.c:8:
/usr/include/sys/uuid.h:77:21: error: conflicting types for 'uuid_t'
 typedef struct uuid uuid_t;
                     ^~~~~~
In file included from /var/tmp/portage/dev-lang/python-3.7.0/work/Python-3.7.0/Modules/_uuidmodule.c:5:0:
/usr/include/uuid/uuid.h:44:23: note: previous declaration of 'uuid_t' was here
 typedef unsigned char uuid_t[16];
                       ^~~~~~
[...]


Apparently the cause is that it includes headers belonging to the system uuid library and libuuid (from util-linux) simultaneously.  The whole module seems to be written with the assumption that the two different implementations will not be present simultaneously.  However, some software supports libuuid only, so we're forced to have both.

Attaching the complete build log.  I will submit a PR soonish.
History
Date User Action Args
2022-04-11 14:59:04adminsetgithub: 78547
2018-08-09 07:26:17mgornysetkeywords: + patch
stage: patch review
pull_requests: + pull_request8198
2018-08-09 06:48:30mgornycreate