Opened 16 years ago

Closed 15 years ago

#14112 closed defect (fixed)

python25 on leopard doesn't build

Reported by: svnk@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: python leopard Cc:
Port:

Description

I tried

sudo port selfupdate
sudo port clean --all python25
sudo port -d install python25

I saw the following strange things:

during configure:

...

checking LDSHARED... ./configure: line 11026: test: >: unary operator expected

...

and then during build:

...

ranlib libpython2.5.a
/usr/bin/libtool -o libpython2.5.dylib -dynamic  \
		-all_load libpython2.5.a -single_module \
		-install_name /opt/local/lib/libpython2.5.dylib \
		-compatibility_version 2.5 \
		-current_version 2.5 -lSystem -lSystemStubs -L/opt/local/lib
ld64: unknown option to -macosx_version_min not 10.xld64: unknown option to -macosx_version_min not 10.xld64: unknown option to -macosx_version_min not 10.xld64: unknown option to -macosx_version_min not 10.x/usr/bin/gcc-4.0 -L/opt/local/lib -u _PyMac_Error -o python.exe \
			Modules/python.o \
			-L. -lpython2.5 -ldl      

...

creating build/lib.macosx-10.5-i386-2.5
/usr/bin/gcc-4.0 -L/opt/local/lib -bundle -bundle_loader python.exe -L/opt/local/lib -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I./Include -I/opt/local/include -D__DARWIN_UNIX03 build/temp.macosx-10.5-i386-2.5/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python25/work/Python-2.5.1/Modules/_struct.o -L/opt/local/lib -L/usr/local/lib -o build/lib.macosx-10.5-i386-2.5/_struct.so
Undefined symbols:
  "_PyType_Type", referenced from:
      _PyType_Type$non_lazy_ptr in _struct.o
  "_PyInt_AsSsize_t", referenced from:
      _s_pack_into in _struct.o
  "__PyFloat_Pack8", referenced from:
      _bp_double in _struct.o
      _lp_double in _struct.o
  "_PyTuple_Pack", referenced from:
      _s_unpack in _struct.o
  "_PyLong_AsUnsignedLongLong", referenced from:
      _np_ulonglong in _struct.o
  "_PyLong_FromString", referenced from:
      _init_struct in _struct.o
  "_PyObject_GenericSetAttr", referenced from:
      _PyStructType in _struct.o
  "_PyLong_AsVoidPtr", referenced from:
      _np_void_p in _struct.o
  "_PyString_Type", referenced from:
      _PyString_Type$non_lazy_ptr in _struct.o
  "_PyFloat_AsDouble", referenced from:
      _np_float in _struct.o
      _np_double in _struct.o
      _bp_float in _struct.o
      _bp_double in _struct.o
      _lp_float in _struct.o
      _lp_double in _struct.o
  "_PyInt_FromSsize_t", referenced from:
      _s_get_size in _struct.o
  "_PyObject_Str", referenced from:
      __range_error in _struct.o
  "_PyObject_ClearWeakRefs", referenced from:
      _s_dealloc in _struct.o
  "__PyFloat_Unpack4", referenced from:
      _lu_float in _struct.o
      _bu_float in _struct.o
  "_PyObject_AsWriteBuffer", referenced from:
      _s_pack_into in _struct.o
  "__PyFloat_Unpack8", referenced from:
      _lu_double in _struct.o
      _bu_double in _struct.o
  "_PyExc_TypeError", referenced from:
      _PyExc_TypeError$non_lazy_ptr in _struct.o
  "_PyErr_NoMemory", referenced from:
      _s_init in _struct.o
  "_PyLong_AsUnsignedLong", referenced from:
      _get_ulong in _struct.o
      _get_wrapped_long in _struct.o
      _get_wrapped_ulong in _struct.o
      _get_wrapped_ulong in _struct.o
  "_PyString_AsString", referenced from:
      _np_char in _struct.o
  "_PyLong_AsLongLong", referenced from:
      _np_longlong in _struct.o
  "_PyInt_AsLong", referenced from:
      _get_long in _struct.o
  "_PyErr_SetString", referenced from:
      _get_pylong in _struct.o
      _get_long in _struct.o
      _get_ulong in _struct.o
      _np_byte in _struct.o
      _np_ubyte in _struct.o
      _np_char in _struct.o
      _np_short in _struct.o
      _np_ushort in _struct.o
      _np_float in _struct.o
      _np_double in _struct.o
      _bp_float in _struct.o
      _bp_double in _struct.o
      _lp_float in _struct.o
      _lp_double in _struct.o
      _s_pack_internal in _struct.o
      _s_init in _struct.o
      _s_init in _struct.o
  "_PyLong_FromLong", referenced from:
      _get_pylong in _struct.o
  "__Py_NoneStruct", referenced from:
      __Py_NoneStruct$non_lazy_ptr in _struct.o
  "_PyErr_Format", referenced from:
      __range_error in _struct.o
      __range_error in _struct.o
      _s_unpack in _struct.o
      _s_unpack_from in _struct.o
      _s_pack in _struct.o
      _s_pack_into in _struct.o
  "_PyFloat_Type", referenced from:
      _PyFloat_Type$non_lazy_ptr in _struct.o
  "_PyType_GenericAlloc", referenced from:
      _PyStructType in _struct.o
  "_PyModule_AddIntConstant", referenced from:
      _init_struct in _struct.o
      _init_struct in _struct.o
      _init_struct in _struct.o
  "_PyString_FromStringAndSize", referenced from:
      _nu_char in _struct.o
      _s_unpack_internal in _struct.o
      _s_unpack_internal in _struct.o
      _s_pack in _struct.o
  "_PyNumber_And", referenced from:
      _get_wrapped_long in _struct.o
      _get_wrapped_ulong in _struct.o
  "_PyLong_FromUnsignedLongLong", referenced from:
      _nu_ulonglong in _struct.o
      _bu_ulonglong in _struct.o
      _lu_ulonglong in _struct.o
  "_PyType_IsSubtype", referenced from:
      _get_pylong in _struct.o
      _get_pylong in _struct.o
      _get_pylong in _struct.o
      _get_long in _struct.o
      _get_ulong in _struct.o
      _get_wrapped_long in _struct.o
      _get_wrapped_long in _struct.o
      _get_wrapped_ulong in _struct.o
      _np_char in _struct.o
      _s_unpack in _struct.o
      _s_pack_internal in _struct.o
      _s_pack_internal in _struct.o
      _s_pack_internal in _struct.o
  "_PyObject_GenericGetAttr", referenced from:
      _PyStructType in _struct.o
  "_PyFloat_FromDouble", referenced from:
      _nu_float in _struct.o
      _nu_double in _struct.o
      _lu_float in _struct.o
      _lu_double in _struct.o
      _bu_float in _struct.o
      _bu_double in _struct.o
  "_PyExc_DeprecationWarning", referenced from:
      _PyExc_DeprecationWarning$non_lazy_ptr in _struct.o
  "_PyInt_Type", referenced from:
      _PyInt_Type$non_lazy_ptr in _struct.o
  "_PyNumber_Int", referenced from:
      _get_long in _struct.o
      _get_wrapped_long in _struct.o
      _get_wrapped_ulong in _struct.o
  "_PyType_Ready", referenced from:
      _init_struct in _struct.o
  "__PyArg_ParseTuple_SizeT", referenced from:
      _s_unpack in _struct.o
  "_PyString_Size", referenced from:
      _np_char in _struct.o
  "_PyErr_Clear", referenced from:
      _get_long in _struct.o
      _get_wrapped_long in _struct.o
      _get_wrapped_long in _struct.o
      _get_wrapped_ulong in _struct.o
      _get_wrapped_ulong in _struct.o
  "_PyErr_NewException", referenced from:
      _init_struct in _struct.o
  "_PyLong_FromLongLong", referenced from:
      _nu_longlong in _struct.o
      _bu_longlong in _struct.o
      _lu_longlong in _struct.o
  "_PyModule_AddObject", referenced from:
      _init_struct in _struct.o
      _init_struct in _struct.o
  "_PyErr_ExceptionMatches", referenced from:
      _get_long in _struct.o
      _get_wrapped_long in _struct.o
      _s_pack_internal in _struct.o
  "_PyExc_OverflowError", referenced from:
      _PyExc_OverflowError$non_lazy_ptr in _struct.o
  "_PyLong_FromUnsignedLong", referenced from:
      _nu_uint in _struct.o
      _nu_ulong in _struct.o
      _bu_uint in _struct.o
      _lu_uint in _struct.o
  "_PyErr_WarnEx", referenced from:
      _get_long in _struct.o
      _get_wrapped_long in _struct.o
      _get_wrapped_long in _struct.o
      _get_wrapped_ulong in _struct.o
      _get_wrapped_ulong in _struct.o
      __range_error in _struct.o
  "_PyErr_Occurred", referenced from:
      _get_long in _struct.o
      _get_ulong in _struct.o
      _get_wrapped_long in _struct.o
      _get_wrapped_ulong in _struct.o
      _get_wrapped_ulong in _struct.o
      _np_longlong in _struct.o
      _np_ulonglong in _struct.o
      _np_float in _struct.o
      _np_double in _struct.o
      _np_void_p in _struct.o
      _bp_float in _struct.o
      _bp_double in _struct.o
      _lu_float in _struct.o
      _lu_double in _struct.o
      _lp_float in _struct.o
      _lp_double in _struct.o
      _bu_float in _struct.o
      _bu_double in _struct.o
  "_PyLong_Type", referenced from:
      _PyLong_Type$non_lazy_ptr in _struct.o
  "_PyInt_FromLong", referenced from:
      _nu_byte in _struct.o
      _nu_ubyte in _struct.o
      _nu_short in _struct.o
      _nu_ushort in _struct.o
      _nu_int in _struct.o
      _nu_uint in _struct.o
      _nu_long in _struct.o
      _nu_ulong in _struct.o
      _nu_longlong in _struct.o
      _nu_ulonglong in _struct.o
      _bu_int in _struct.o
      _bu_uint in _struct.o
      _bu_longlong in _struct.o
      _bu_ulonglong in _struct.o
      _lu_int in _struct.o
      _lu_uint in _struct.o
      _lu_longlong in _struct.o
      _lu_ulonglong in _struct.o
      _init_struct in _struct.o
  "_PyObject_Free", referenced from:
      _PyStructType in _struct.o
  "_PyErr_Fetch", referenced from:
      __range_error in _struct.o
  "_Py_InitModule4", referenced from:
      _init_struct in _struct.o
  "__PyLong_AsByteArray", referenced from:
      _bp_longlong in _struct.o
      _bp_ulonglong in _struct.o
      _lp_longlong in _struct.o
      _lp_ulonglong in _struct.o
  "_PyLong_FromVoidPtr", referenced from:
      _nu_void_p in _struct.o
  "__PyArg_ParseTupleAndKeywords_SizeT", referenced from:
      _s_unpack_from in _struct.o
      _s_init in _struct.o
  "_PyTuple_New", referenced from:
      _s_unpack_internal in _struct.o
  "__PyFloat_Pack4", referenced from:
      _bp_float in _struct.o
      _lp_float in _struct.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

... and more of these stacktraces and then

--->  Staging python25 into destroot
Error: Target org.macports.destroot returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python25/work/Python-2.5.1" && make altinstall maninstall DESTDIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python25/work/destroot " returned error 2

...

Change History (6)

comment:1 Changed 16 years ago by afb@…

Ticket #11267 has a revised python25

comment:2 Changed 16 years ago by svnk@…

thanks for the quick reply.

ok. tried it and follewd the recipe in #11267:comment21.

checking LDSHARED... ./configure: line 11028: test: >: unary operator expected

is still there, as is

/usr/bin/libtool -o libpython2.5.dylib -dynamic  \
		-all_load libpython2.5.a -single_module \
		-install_name /opt/local/lib/libpython2.5.dylib \
		-compatibility_version 2.5 \
		-current_version 2.5 -lSystem -lSystemStubs
ld64: unknown option to -macosx_version_min not 10.xld64: unknown option to -macosx_version_min not 10.xld64: unknown option to -macosx_version_min not 10.xld64: unknown option to -macosx_version_min not 10.x/usr/bin/gcc-4.0 -L/opt/local/lib -u _PyMac_Error -o python.exe \
			Modules/python.o \
			-L. -lpython2.5 -ldl      

and a few lines later the

/usr/bin/gcc-4.0 -L/opt/local/lib -bundle -bundle_loader python.exe -L/opt/local/lib -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I./Include -I/opt/local/include -D__DARWIN_UNIX03 build/temp.macosx-10.5-i386-2.5/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python25/work/Python-2.5.1/Modules/_struct.o -L/opt/local/lib -L/usr/local/lib -o build/lib.macosx-10.5-i386-2.5/_struct.so
Undefined symbols:
  "_PyType_Type", referenced from:
      _PyType_Type$non_lazy_ptr in _struct.o
  "_PyInt_AsSsize_t", referenced from:
      _s_pack_into in _struct.o
  "__PyFloat_Pack8", referenced from:
      _bp_double in _struct.o
...

and lost of similar errors. It still finishes with

make: *** [libinstall] Error 1

Warning: the following items did not execute (for python25): org.macports.activate org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.

so this didn`t fix it for me.

comment:3 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to mww@…

Assigning to maintainer of python25.

comment:4 Changed 16 years ago by svnk@…

OK.

The following fixed it for me:

the first error during configure

checking LDSHARED... ./configure: line 11026: test: >: unary operator expected

comes from the following line in configure:

if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2

it turns out that, although in my shell MACOSX_DEPLOYMENT_TARGET=10.4, this never makes it to the configure script. After tweaking the Portfile with a

configure.env MACOSX_DEPLOYMENT_TARGET=10.4

python25 builds and installs fine.

for the context:

Macosx 10.5.1 on a MacBookPro 2.33GHz Core 2 Duo.

Hardcoding the MACOSX_DEPLOYMENT_TARGET is propably not TRD, but it worked for me.

comment:5 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:6 Changed 15 years ago by tobypeterson

Resolution: fixed
Status: newclosed

Should be fixed now that we explicitly set MACOSX_DEPLOYMENT_TARGET

Note: See TracTickets for help on using tickets.