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

Mac 'make frameworkinstall' error: [...]/Python.framework/Versions/3.1/bin/2to3: Too many levels of symbolic links #50420

Closed
srid mannequin opened this issue Jun 2, 2009 · 19 comments
Labels
build The build process and cross-build OS-mac

Comments

@srid
Copy link
Mannequin

srid mannequin commented Jun 2, 2009

BPO 6170
Nosy @ronaldoussoren, @tarekziade, @ned-deily

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 = <Date 2009-06-26.23:42:36.941>
created_at = <Date 2009-06-02.00:00:39.645>
labels = ['OS-mac', 'build']
title = "Mac 'make frameworkinstall' error: [...]/Python.framework/Versions/3.1/bin/2to3: Too many levels of symbolic links"
updated_at = <Date 2009-06-26.23:42:36.940>
user = 'https://bugs.python.org/srid'

bugs.python.org fields:

activity = <Date 2009-06-26.23:42:36.940>
actor = 'srid'
assignee = 'none'
closed = True
closed_date = <Date 2009-06-26.23:42:36.941>
closer = 'srid'
components = ['Build', 'macOS']
creation = <Date 2009-06-02.00:00:39.645>
creator = 'srid'
dependencies = []
files = []
hgrepos = []
issue_num = 6170
keywords = []
message_count = 19.0
messages = ['88689', '88690', '88691', '88693', '88694', '88696', '88697', '88721', '88726', '88728', '88731', '88732', '88733', '88736', '88737', '88784', '88852', '88853', '89747']
nosy_count = 4.0
nosy_names = ['ronaldoussoren', 'tarek', 'ned.deily', 'srid']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'compile error'
url = 'https://bugs.python.org/issue6170'
versions = ['Python 3.1']

@srid
Copy link
Mannequin Author

srid mannequin commented Jun 2, 2009

$ make frameworkinstall DESTDIR=[...]/py3_1rc1-macosx-apy31-rrun/image
running install_scripts
[...]
copying build/scripts-3.1/2to3 ->
//Users/apy/rrun/build/activepython-svn-trunk/build/py3_1rc1-macosx-apy31-rrun/image/Library/Frameworks/Python.framework/Versions/3.1/bin
error:
//Users/apy/rrun/build/activepython-svn-trunk/build/py3_1rc1-macosx-apy31-rrun/image/Library/Frameworks/Python.framework/Versions/3.1/bin/2to3:
Too many levels of symbolic links
make: *** [sharedinstall] Error 1

!
!

this appears to be a regression in 3.1rc1 (used to work with 3.1b2).
need to investigate further. will update this bug if I find anything
useful. (quick observation .. 'install_scripts' seem to be run twice)

@srid srid mannequin added the stdlib Python modules in the Lib dir label Jun 2, 2009
@srid srid mannequin assigned tarekziade Jun 2, 2009
@srid srid mannequin added the build The build process and cross-build label Jun 2, 2009
@srid
Copy link
Mannequin Author

srid mannequin commented Jun 2, 2009

To explain further, the following section of script is run *twice* ..
and thus explains the error "Too many levels of symbolic links"

mv
"[...]/image/Library/Frameworks/Python.framework/Versions/3.1/bin/2to3"
"[...]]/image/Library/Frameworks/Python.framework/Versions/3.1/bin/2to3-3.1"
ln -sf
"[...]/image/Library/Frameworks/Python.framework/Versions/3.1/bin/2to3-3.1"
"[...]/image/Library/Frameworks/Python.framework/Versions/3.1/bin/2to3"

The entire log file is here: http://double.activestate.com/t/apy31-anole.log

On 09-06-01 04:46 PM, Sridhar Ratnakumar wrote:

>
> make: [image_python] PythonLauncher build attempt 1 of 2 (see bug 44709)
> make: [image_python] running 'cd build/py3_1rc1-macosx-apy31-rrun/python
> && make frameworkinstallapps
>
DESTDIR=/Users/apy/rrun/build/activepython-svn-trunk/build/py3_1rc1-macosx-apy31-rrun/image'
> [...]
> make: [image_python] running 'cd build/py3_1rc1-macosx-apy31-rrun/python
> && make frameworkinstall frameworkinstallextras
>
DESTDIR=/Users/apy/rrun/build/activepython-svn-trunk/build/py3_1rc1-macosx-apy31-rrun/image'
> [...]
>
>
> Note: the second make attempt uses 'frameworkinstallextras' as the extra
> argument.
>
> .
> .
>
> This appears to be breaking 3.1rc1 on Mac ("Too many levels of symbolic
> links"):
>
> running install_scripts
> [...]
> copying build/scripts-3.1/2to3 ->
>
//Users/apy/rrun/build/activepython-svn-trunk/build/py3_1rc1-macosx-apy31-rrun/image/Library/Frameworks/Python.framework/Versions/3.1/bin
> error:
>
//Users/apy/rrun/build/activepython-svn-trunk/build/py3_1rc1-macosx-apy31-rrun/image/Library/Frameworks/Python.framework/Versions/3.1/bin/2to3:
> Too many levels of symbolic links
> make: *** [sharedinstall] Error 1

@srid
Copy link
Mannequin Author

srid mannequin commented Jun 2, 2009

Tarek, are you perchance aware of any change that went into distutils
since the last beta release that could have influenced the make behavior?

@tarekziade
Copy link
Mannequin

tarekziade mannequin commented Jun 2, 2009

No, but I am running frameworkinstall right now under Mac to see if I
can reproduce the problem

@srid
Copy link
Mannequin Author

srid mannequin commented Jun 2, 2009

To help with the repro, may I suggest running the following in the same
order:

make frameworkinstallframework DESTDIR=image
make frameworkinstallapps DESTDIR=image
make frameworkinstall frameworkinstallextras DESTDIR=image

@tarekziade
Copy link
Mannequin

tarekziade mannequin commented Jun 2, 2009

I'll try tomorrow asap (sorry it's 2:30 am now here)

@srid
Copy link
Mannequin Author

srid mannequin commented Jun 2, 2009

also related to bpo-5756

@srid srid mannequin added build The build process and cross-build topic-2to3 labels Jun 2, 2009
@ned-deily
Copy link
Member

The URL you provide for the log doesn't seem to be accessible externally
so it is difficult to guess exactly what was being done. However, there
were changes between 3.1b2 and 3.1rc1 to the top-level Makefile
(Makefile.pre.in) and to the Mac/Makefile.in affecting framework builds
and installs.

@tarekziade
Copy link
Mannequin

tarekziade mannequin commented Jun 2, 2009

Sorry I can't reproduce it,

can you tell me how you run configure precisely ?
eg the whole set of commands after a fresh checkout

@ronaldoussoren
Copy link
Contributor

I also cannot reproduce this, using both the py3k branch and the r31rc1
tag.

My build procedure:

  • cd r31rc1
  • mkdir build
  • cd build
  • ../configure --enable-framework --enable-universalsdk
  • make
  • make install DESTDIR=$PWD/image

The resulting framework in the $DESTDIR seems to be complete, and I
don't get errors while building it.

@ronaldoussoren
Copy link
Contributor

Now I'm really confused, I tried to install a second time and this time I
do get an error.

Time to start hunting down an issue...

@tarekziade
Copy link
Mannequin

tarekziade mannequin commented Jun 2, 2009

Ronald, did you try Sridar precise sequence after Pyhon was built ?

make frameworkinstallframework DESTDIR=image
make frameworkinstallapps DESTDIR=image
make frameworkinstall frameworkinstallextras DESTDIR=image

@ronaldoussoren
Copy link
Contributor

Manually running "make frameworkinstallframework" (and the other ones) is
not supported, those are internal makefile targets that are are used to
implement "make install".

"make framworkinstall" is supported as an alias for "make install" because
the former was the only way to install a framework for a long time.

@ronaldoussoren
Copy link
Contributor

I found the issue.

In r72899 antoine.pitrou checked in a change that adds these two lines
to the bininstall target in Makefile.pre.in:

-rm -f $(DESTDIR)$(LIBPC)/python3.pc
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc)

This exposes a bug in the configure script, which causes target
'bininstall' to run before 'libainstall' when your doing a framework
install. The latter target is the one that creates python-
$(VERSION).pc, which is why we get build failures.

What I don't understand is why I've been able to install frameworks all
along and didn't notice this before.

I'm working on a patch, and will check that in after I've full tested
it.

The important bit of the patch is this change to configure.in:

  •   FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure 
    

bininstall maninstall"
+ FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "

@ronaldoussoren ronaldoussoren added OS-mac and removed stdlib Python modules in the Lib dir topic-2to3 labels Jun 2, 2009
@ronaldoussoren
Copy link
Contributor

This should be fixed in r73142, please test.

@ned-deily
Copy link
Member

That seems to work. However, while testing that, I found another, minor
problem in that same area. In Makefile.pre.in bininstall target just
before the lines you cite, there is also this added in r71935:

-rm -f $(DESTDIR)$(BINDIR)/python3-config
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-
config)

Prior to that, though, the Mac Makefile target install_versionedtools is
mucking in the same area:

if [ ! -h "$(DESTDIR)$(prefix)/bin/python3-config" ]; then \
mv "$(DESTDIR)$(prefix)/bin/python3-config"
"$(DESTDIR)$(prefix)/bin/python$(VERSION)-config" ;\
ln -sf "python$(VERSION)-config" "$(DESTDIR)$(prefix)/bin/python3-
config" ; \
fi

and, in fact, the mv fails with an error because (1) the python3-config
hasn't been created yet and (2) the test is incorrect: ! -h is also true
if the file doesn't exist. With the code in bininstall, I think these
lines can be safely removed from install_versionedtools.

@srid
Copy link
Mannequin Author

srid mannequin commented Jun 3, 2009

Ronald, a quick note - your fix unfortunately did not solve the issue.

[quote]'To help with the repro, may I suggest running the following in
the same
order:

make frameworkinstallframework DESTDIR=image
make frameworkinstallapps DESTDIR=image
make frameworkinstall frameworkinstallextras DESTDIR=image
'[endquote[

@ronaldoussoren
Copy link
Contributor

Don't do that, use 'make install DESTDIR=$PWD/image'. As I mentioned
earlier 'make frameworkinstallframework' is an internal step that
shouldn't be used on its own.

@tarekziade tarekziade mannequin removed their assignment Jun 4, 2009
@srid
Copy link
Mannequin Author

srid mannequin commented Jun 26, 2009

Ok, I am no longer relying on internal targets .. and this problem is
fixed for me. It needs to be closed, correct?

@srid srid mannequin closed this as completed Jun 26, 2009
@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
build The build process and cross-build OS-mac
Projects
None yet
Development

No branches or pull requests

2 participants