You are not logged in.

#1 2016-09-16 11:14:26

asterix45
Member
Registered: 2016-09-16
Posts: 2

[SOLVED] Python 3.4.4 compiling from source error

Hi all,

I'm trying to compile Python 3.4.4 from source and install it under /opt dir.
I've downloaded this tar

https://www.python.org/ftp/python/3.4.4 … -3.4.4.tgz

and used this commands:

./configure --prefix=/opt/python3.4.4
make
make install

I obtain this error

gcc -pthread   -Xlinker -export-dynamic -o python Modules/python.o libpython3.4m.a -lpthread -ldl  -lutil   -lm  
if test "no-framework" = "no-framework" ; then \
	/usr/bin/install -c python /opt/python3.4.4/bin/python3.4m; \
else \
	/usr/bin/install -c -s Mac/pythonw /opt/python3.4.4/bin/python3.4m; \
fi
if test "3.4" != "3.4m"; then \
	if test -f /opt/python3.4.4/bin/python3.4 -o -h /opt/python3.4.4/bin/python3.4; \
	then rm -f /opt/python3.4.4/bin/python3.4; \
	fi; \
	(cd /opt/python3.4.4/bin; ln python3.4m python3.4); \
fi
if test -f libpython3.4m.a && test "no-framework" = "no-framework" ; then \
	if test -n "" ; then \
		/usr/bin/install -c -m 555  /opt/python3.4.4/bin; \
	else \
		/usr/bin/install -c -m 555 libpython3.4m.a /opt/python3.4.4/lib/libpython3.4m.a; \
		if test libpython3.4m.a != libpython3.4m.a; then \
			(cd /opt/python3.4.4/lib; ln -sf libpython3.4m.a libpython3.4m.a) \
		fi \
	fi; \
	if test -n ""; then \
		/usr/bin/install -c -m 555  /opt/python3.4.4/lib/; \
	fi; \
else	true; \
fi
zsh:9: parse error near `fi'
make: *** [Makefile:1055: altbininstall] Error 1

Can anyone help me?
Thanks in advance.

Last edited by asterix45 (2016-09-16 13:41:10)

Offline

#2 2016-09-16 11:50:55

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] Python 3.4.4 compiling from source error

1. Use code tags for your code on the forums.

2. Try running the script in bash or sh. "Parse error near 'fi'" looks like zsh doesn't like the makefile syntax.

Offline

#3 2016-09-16 12:09:39

Omar007
Member
Registered: 2015-04-09
Posts: 368

Re: [SOLVED] Python 3.4.4 compiling from source error

Another thing that might help is to take a look at the PKGBUILD used by Arch to create the python build in the repository.
Usually if there are specific changes needed for things to build properly you'll find them in there (https://git.archlinux.org/svntogit/pack … ges/python).

And as always, try to do clean builds so your system customizations don't mess with the build process: https://wiki.archlinux.org/index.php/De … ean_Chroot.

Offline

#4 2016-09-16 13:31:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [SOLVED] Python 3.4.4 compiling from source error

asterix45 wrote:

I'm trying to compile Python 3.4.4 from source and install it under /opt dir.

Why are you trying to do this, do you really need 3.4.4 exactly?  Why are you trying to do it without a PKGBUILD?  Why not use the PKGBUILD for 3.4.5 in the aur and just change the revision number (if you really need 3.4.4 not 3.4.5).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2016-09-16 13:40:30

asterix45
Member
Registered: 2016-09-16
Posts: 2

Re: [SOLVED] Python 3.4.4 compiling from source error

Awebb wrote:

1. Use code tags for your code on the forums.

Sorry for this, I edited my first post

Awebb wrote:

2. Try running the script in bash or sh. "Parse error near 'fi'" looks like zsh doesn't like the makefile syntax.

This was the problem: I'm working a very basic docker installation without bash installed. Installing and using bash to

make install

compiled Python.

Trilby wrote:

Why are you trying to do this, do you really need 3.4.4 exactly?

We are using venv with python based on a particular version (3.4.4) to make systems independent application. So I'm trying to use docker + arch linux to take benefits of both.

Thanks for quick response!

Offline

Board footer

Powered by FluxBB