View previous topic :: View next topic |
Author |
Message |
pilla Bodhisattva
Joined: 07 Aug 2002 Posts: 7731 Location: Underworld
|
Posted: Fri Jun 17, 2016 4:43 pm Post subject: [SOLVED] FreeBSD, upgrading from 9.1 to 10.3, broken python |
|
|
After going through many steps of the upgrade from 9.1 to 10.3 in a recently installed Gentoo FreeBSD (actually I don't consider it ready yet), I got a broken python.
Code: |
x86_64-gentoo-freebsd10.3-gcc -pthread -shared -L. -Wl,--no-as-needed -o libpython3.so -Wl,-hlibpython3.so libpython3.5m.so
x86_64-gentoo-freebsd10.3-gcc -pthread -L. -Wl,--export-dynamic -o python Programs/python.o -L. -lpython3.5m -lintl -lutil -lm
LD_LIBRARY_PATH=/var/tmp/portage/dev-lang/python-3.5.1-r3/work/x86_64-gentoo-freebsd10.3 ./python -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ValueError: CODESET is not set or empty
Current thread 0x0000000802006400 (most recent call first):
Abort trap (core dumped)
generate-posix-vars failed
gmake: *** [pybuilddir.txt] Error 1
* ERROR: dev-lang/python-3.5.1-r3::gentoo failed (compile phase):
* emake failed
|
The important thing is
Code: |
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ValueError: CODESET is not set or empty
|
Which will happen every time I run python 3.2 and 3.4. python 2.7 seems to be working.
Any hints? _________________ "I'm just very selective about the reality I choose to accept." -- Calvin
Last edited by pilla on Fri Jun 17, 2016 6:33 pm; edited 1 time in total |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Fri Jun 17, 2016 6:10 pm Post subject: |
|
|
pilla ...
well, its locale related (see here). Try the following:
/etc/portage/make.conf: | LANG="C"
LC_CTYPE="$LANG"
LC_COLLATE="$LANG" |
HTH & best ... khay |
|
Back to top |
|
|
pilla Bodhisattva
Joined: 07 Aug 2002 Posts: 7731 Location: Underworld
|
Posted: Fri Jun 17, 2016 6:26 pm Post subject: |
|
|
khayyam, it does not work.
edit: setting LC_ALL fixed it. Thanks for pushing me the right way. _________________ "I'm just very selective about the reality I choose to accept." -- Calvin |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|