Skip to content

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

Closed as not planned

Description

@mgorny
mannequin
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']

    Activity

    1. mgorny commented on Aug 9, 2018

      mgornymannequin
      MannequinAuthor

      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.

    2. transferred this issue fromon Apr 10, 2022
    3. serhiy-storchaka commented on Dec 26, 2023

      @serhiy-storchaka
      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.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions