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: libainstall doesn't create $(BINDIR) directory
Type: compile error Stage: resolved
Components: Build Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: orsenthil Nosy List: bennoleslie, georg.brandl, loewis, miss-islington, orsenthil, r.david.murray
Priority: normal Keywords: patch

Created on 2013-01-05 03:47 by bennoleslie, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
ainstall.diff bennoleslie, 2013-01-05 03:47 Add $(BINDIR) to list of directories to create review
Pull Requests
URL Status Linked Edit
PR 25980 merged orsenthil, 2021-05-08 03:25
PR 25982 merged miss-islington, 2021-05-08 06:39
PR 25981 merged miss-islington, 2021-05-08 06:39
Messages (12)
msg179103 - (view) Author: Benno Leslie (bennoleslie) * Date: 2013-01-05 03:47
make libainstall fails when $(BINDIR) does not exist.
msg179155 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2013-01-06 00:05
Thanks for the fix. The patches fixes it. Since this is a bug fix, it should be backported all the way till 2.7.
msg179160 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2013-01-06 00:45
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.
msg179163 - (view) Author: Benno Leslie (bennoleslie) * Date: 2013-01-06 01:44
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.
msg179168 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2013-01-06 03:46
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.
msg179249 - (view) Author: Benno Leslie (bennoleslie) * Date: 2013-01-07 09:00
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.
msg228508 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-10-04 22:39
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.
msg393193 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2021-05-07 16:30
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
msg393196 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2021-05-07 17:49
issue25696 was related, and it fixed bininstall issue.
msg393235 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2021-05-08 03:24
Looks like the BINDIR dependency was added here - https://github.com/python/cpython/commit/49fd7fa4431da299196d74087df4a04f99f9c46f#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.
msg393239 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2021-05-08 06:41
Fixed in 3.11 here - https://github.com/python/cpython/commit/80d250d68cf3bb511fd862169c681b28028499c2
msg393250 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2021-05-08 12:10
In 3.10 - https://github.com/python/cpython/commit/a2c72d52dddefbfbaa0745b0af54330fad03b29e

3.9 - https://github.com/python/cpython/commit/a25c46bd7dd47a2f95b32d17ee2f66de214892c6
History
Date User Action Args
2022-04-11 14:57:40adminsetgithub: 61070
2021-05-08 12:10:56orsenthilsetstatus: open -> closed
resolution: fixed
messages: + msg393250

stage: patch review -> resolved
2021-05-08 06:41:02orsenthilsetmessages: + msg393239
2021-05-08 06:39:35miss-islingtonsetpull_requests: + pull_request24634
2021-05-08 06:39:25miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request24633
2021-05-08 03:25:56orsenthilsetstage: needs patch -> patch review
pull_requests: + pull_request24632
2021-05-08 03:24:44orsenthilsetmessages: + msg393235
2021-05-07 17:49:38orsenthilsetmessages: + msg393196
2021-05-07 16:30:27orsenthilsetmessages: + msg393193
versions: + Python 3.9, Python 3.10, Python 3.11, - Python 2.7, Python 3.4, Python 3.5
2014-10-04 22:39:04r.david.murraysetversions: + Python 3.5, - Python 3.2, Python 3.3
nosy: + r.david.murray

messages: + msg228508

stage: commit review -> needs patch
2013-01-07 09:00:06bennolesliesetmessages: + msg179249
2013-01-06 03:46:46orsenthilsetmessages: + msg179168
2013-01-06 01:44:31bennolesliesetmessages: + msg179163
2013-01-06 00:45:42orsenthilsetnosy: + loewis, georg.brandl
messages: + msg179160
2013-01-06 00:05:42orsenthilsetversions: + Python 2.7, Python 3.2, Python 3.3
nosy: + orsenthil

messages: + msg179155

assignee: orsenthil
stage: commit review
2013-01-05 03:47:45bennolesliesettitle: libainstall doesn't create all directories -> libainstall doesn't create $(BINDIR) directory
2013-01-05 03:47:30bennolesliecreate