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

libainstall doesn't create $(BINDIR) directory #61070

Closed
bennoleslie mannequin opened this issue Jan 5, 2013 · 12 comments
Closed

libainstall doesn't create $(BINDIR) directory #61070

bennoleslie mannequin opened this issue Jan 5, 2013 · 12 comments
Assignees
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes build The build process and cross-build

Comments

@bennoleslie
Copy link
Mannequin

bennoleslie mannequin commented Jan 5, 2013

BPO 16866
Nosy @loewis, @birkenfeld, @orsenthil, @bitdancer, @miss-islington
PRs
  • bpo-16866 Fix make libainstall. #25980
  • [3.10] bpo-16866: Fix make libainstall. (GH-25980) #25982
  • [3.9] bpo-16866 : Fix make libainstall. (GH-25980) #25981
  • Files
  • ainstall.diff: Add $(BINDIR) to list of directories to create
  • 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 = 'https://github.com/orsenthil'
    closed_at = <Date 2021-05-08.12:10:56.374>
    created_at = <Date 2013-01-05.03:47:30.250>
    labels = ['build', '3.9', '3.10', '3.11']
    title = "libainstall doesn't create $(BINDIR) directory"
    updated_at = <Date 2021-05-08.12:10:56.374>
    user = 'https://bugs.python.org/bennoleslie'

    bugs.python.org fields:

    activity = <Date 2021-05-08.12:10:56.374>
    actor = 'orsenthil'
    assignee = 'orsenthil'
    closed = True
    closed_date = <Date 2021-05-08.12:10:56.374>
    closer = 'orsenthil'
    components = ['Build']
    creation = <Date 2013-01-05.03:47:30.250>
    creator = 'bennoleslie'
    dependencies = []
    files = ['28569']
    hgrepos = []
    issue_num = 16866
    keywords = ['patch']
    message_count = 12.0
    messages = ['179103', '179155', '179160', '179163', '179168', '179249', '228508', '393193', '393196', '393235', '393239', '393250']
    nosy_count = 6.0
    nosy_names = ['loewis', 'georg.brandl', 'orsenthil', 'r.david.murray', 'bennoleslie', 'miss-islington']
    pr_nums = ['25980', '25982', '25981']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue16866'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @bennoleslie
    Copy link
    Mannequin Author

    bennoleslie mannequin commented Jan 5, 2013

    make libainstall fails when $(BINDIR) does not exist.

    @bennoleslie bennoleslie mannequin added build The build process and cross-build labels Jan 5, 2013
    @bennoleslie bennoleslie mannequin changed the title libainstall doesn't create all directories libainstall doesn't create $(BINDIR) directory Jan 5, 2013
    @orsenthil
    Copy link
    Member

    Thanks for the fix. The patches fixes it. Since this is a bug fix, it should be backported all the way till 2.7.

    @orsenthil orsenthil self-assigned this Jan 6, 2013
    @orsenthil
    Copy link
    Member

    Digging a little deeper, make libainstall needs $(BINDIR) because of this

    $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config

    *And* that python$(VERSION)-config file refers to the python exe which is available only after bininstall or it's dependees are called.

    In affect, if make libainstall is for using lib/* contents this fix is okay, but leaves a resultant invalid bin/python-config
    So, I am not sure the utility of make libainstall is without executing make bininstall - in which case, this is not a bug and probably a documentation change would be required.

    I am adding Martin and Georg who have dabbled with BUILD previously for their views.

    @bennoleslie
    Copy link
    Mannequin Author

    bennoleslie mannequin commented Jan 6, 2013

    I was using this in the case where I just want to link against libpython.a and for me it is a limited case where I don't really need the functionality of python-config; so for me this is certainly the best approach. But I concede this use case is probably a very little general interest.

    If the goal is to have a working python-config, then I guess libainstall should depend on bininstall.

    I'm not too fussed which approach is taken, I just think that (make && make libainstall) should work.

    I'm happy to fashion a patch for whichever approach is thought to be best.

    @orsenthil
    Copy link
    Member

    Thanks Benno. I think that making libainstall depend on bininstall is
    a right solution too. A nod from devs who have committed changes in
    that area may help. Also, I believe that this is a bug fix and should
    be ported back upto 2.7. If there are any concerns it could be raised.

    @bennoleslie
    Copy link
    Mannequin Author

    bennoleslie mannequin commented Jan 7, 2013

    In a similar manner the bininstall target relies on $(LIBPC), but does not create that.

    This makes me consider if the libainstall target should be installing pkg-config sciprt at all (and whether bininstall should be installing the .pc files).

    It is hard for me to determine what the exact intended goals of each of these targets is, so I can't really come up with the right fix. Naively for both targets ensuring that the directory exists solves the symptom, but to be it looks like there is probably a greater underlying thing to determine here.

    @bitdancer
    Copy link
    Member

    Looks like the status for this one should really be "needs decision". It is sounds like the provided patch is not sufficient regardless, so 'commit review' is no longer the appropriate state. I'm changing it back to patch needed as the closest available state, but we also need a decision.

    @orsenthil
    Copy link
    Member

    This is still a problem behaviour as of May 2021.

    ./configure --prefix=/home/senthil/foobar
    make libainstall

    failed with

    /usr/bin/install: cannot create regular file '/home/senthil/foobar/bin/python3.11-config': No such file or directory
    make: *** [Makefile:1715: libainstall] Error 1

    @orsenthil orsenthil added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes labels May 7, 2021
    @orsenthil
    Copy link
    Member

    bpo-25696 was related, and it fixed bininstall issue.

    @orsenthil
    Copy link
    Member

    Looks like the BINDIR dependency was added here - 49fd7fa#diff-1f0a8db227d22005511b0d90f5339b97db345917b863954b3b3ccb9ec308767cR833 but we didn't add the directory creation dependency then.

    A simple fix of add BINDIR as dependency seems _OK_ to me. At least it wont break the libainstall standalone target.

    @orsenthil
    Copy link
    Member

    Fixed in 3.11 here - 80d250d

    @orsenthil
    Copy link
    Member

    In 3.10 - a2c72d5

    3.9 - a25c46b

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 only security fixes build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants