Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_uuid module fails to compile on FreeBSD when libuuid is installed #78547

Closed
mgorny mannequin opened this issue Aug 9, 2018 · 2 comments
Closed

_uuid module fails to compile on FreeBSD when libuuid is installed #78547

mgorny mannequin opened this issue Aug 9, 2018 · 2 comments
Labels
3.7 (EOL) end of life 3.8 (EOL) end of life build The build process and cross-build extension-modules C modules in the Modules dir OS-freebsd

Comments

@mgorny
Copy link
Mannequin

mgorny mannequin commented Aug 9, 2018

BPO 34366
Nosy @mgorny
PRs
  • bpo-34366: fix FreeBSD with both system lib and libuuid present #8711
  • Files
  • dev-lang:python-3.7.0:20180809-062928.log: dev-lang:python-3.7.0:20180809-062928.log
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2018-08-09.06:48:30.753>
    labels = ['extension-modules', '3.8', 'build', '3.7']
    title = '_uuid module fails to compile on FreeBSD when libuuid is installed'
    updated_at = <Date 2018-08-09.07:26:17.521>
    user = 'https://github.com/mgorny'

    bugs.python.org fields:

    activity = <Date 2018-08-09.07:26:17.521>
    actor = 'mgorny'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Extension Modules']
    creation = <Date 2018-08-09.06:48:30.753>
    creator = 'mgorny'
    dependencies = []
    files = ['47735']
    hgrepos = []
    issue_num = 34366
    keywords = ['patch']
    message_count = 1.0
    messages = ['323317']
    nosy_count = 1.0
    nosy_names = ['mgorny']
    pr_nums = ['8711']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue34366'
    versions = ['Python 3.7', 'Python 3.8']

    @mgorny
    Copy link
    Mannequin Author

    mgorny mannequin commented Aug 9, 2018

    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.

    @mgorny mgorny mannequin added 3.7 (EOL) end of life 3.8 (EOL) end of life extension-modules C modules in the Modules dir build The build process and cross-build labels Aug 9, 2018
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @serhiy-storchaka
    Copy link
    Member

    Closed in favor of the duplicate issue #85077 (if it was not already solved in other issue).

    In any case, thank you for your report and PR, @mgorny. Sorry that we did not have resources to solve it at time.

    @serhiy-storchaka serhiy-storchaka closed this as not planned Won't fix, can't repro, duplicate, stale Dec 26, 2023
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 (EOL) end of life build The build process and cross-build extension-modules C modules in the Modules dir OS-freebsd
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants