LernaeanHydra / pyactivemq

Automatically exported from code.google.com/p/pyactivemq
Apache License 2.0
1 stars 0 forks source link

Build fails on Mac OS X (intel) #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download the latest ActiveMQ C++ trunk or the 2.1.3 release
2. Build and install the activemq-cpp
3. Download the pyactivemq trunk
4. Build the package with pyhon setup.build

What is the expected output? What do you see instead?

Getting this output/error:
$ python setup.py build
running build
running build_ext
building 'pyactivemq' extension
creating build
creating build/temp.macosx-10.3-i386-2.5
creating build/temp.macosx-10.3-i386-2.5/src
creating build/temp.macosx-10.3-i386-2.5/src/main
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -
dynamic -DNDEBUG -g -O3 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/ActiveMQConnectionFactory.cpp -o build/temp.macosx-10.3-i386-
2.5/src/main/ActiveMQConnectionFactory.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -
dynamic -DNDEBUG -g -O3 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/BytesMessage.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/BytesMessage.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -
dynamic -DNDEBUG -g -O3 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/CMSException.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/CMSException.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -
dynamic -DNDEBUG -g -O3 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/Connection.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/Connection.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -
dynamic -DNDEBUG -g -O3 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/ConnectionFactory.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/ConnectionFactory.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -
dynamic -DNDEBUG -g -O3 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/Destinations.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/Destinations.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -
dynamic -DNDEBUG -g -O3 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/ExceptionListener.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/ExceptionListener.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -
dynamic -DNDEBUG -g -O3 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/MapMessage.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/MapMessage.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -
dynamic -DNDEBUG -g -O3 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/Message.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/Message.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -
dynamic -DNDEBUG -g -O3 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/MessageConsumer.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/MessageConsumer.o
../activemq-cpp/src/main/boost/python/detail/caller.hpp: In static member 
function ‘static const 
PyTypeObject* 
boost::python::detail::converter_target_type<ResultConverter>::get_pytype() 
[with 
ResultConverter = to_python_Message<cms::Message*>]’:
../activemq-cpp/src/main/boost/python/detail/caller.hpp:242:   instantiated 
from ‘static 
boost::python::detail::py_func_sig_info 
boost::python::detail::caller_arity<1u>::impl<F, Policies, 
Sig>::signature() [with F = cms::Message* (cms::MessageConsumer::*)(), Policies 
= 
boost::python::return_value_policy<manage_new_Message, 
boost::python::default_call_policies>, Sig = 
boost::mpl::vector2<cms::Message*, cms::MessageConsumer&>]’
../activemq-cpp/src/main/boost/python/object/py_function.hpp:48:   instantiated 
from 
‘boost::python::detail::py_func_sig_info 
boost::python::objects::caller_py_function_impl<Caller>::signature() 
const [with Caller = boost::python::detail::caller<cms::Message* 
(cms::MessageConsumer::*)(), 
boost::python::return_value_policy<manage_new_Message, 
boost::python::default_call_policies>, 
boost::mpl::vector2<cms::Message*, cms::MessageConsumer&> >]’
src/main/MessageConsumer.cpp:85:   instantiated from here
../activemq-cpp/src/main/boost/python/detail/caller.hpp:102: error: ‘struct 
to_python_Message<cms::Message*>’ has no member named ‘get_pytype’
../activemq-cpp/src/main/boost/python/detail/caller.hpp: In static member 
function ‘static const 
PyTypeObject* 
boost::python::detail::converter_target_type<ResultConverter>::get_pytype() 
[with 
ResultConverter = to_python_Message<cms::Message*>]’:
../activemq-cpp/src/main/boost/python/detail/caller.hpp:242:   instantiated 
from ‘static 
boost::python::detail::py_func_sig_info 
boost::python::detail::caller_arity<1u>::impl<F, Policies, 
Sig>::signature() [with F = cms::Message* (cms::MessageConsumer::*)(), Policies 
= 
boost::python::return_value_policy<manage_new_Message, 
boost::python::default_call_policies>, Sig = 
boost::mpl::vector2<cms::Message*, cms::MessageConsumer&>]’
../activemq-cpp/src/main/boost/python/object/py_function.hpp:48:   instantiated 
from 
‘boost::python::detail::py_func_sig_info 
boost::python::objects::caller_py_function_impl<Caller>::signature() 
const [with Caller = boost::python::detail::caller<cms::Message* 
(cms::MessageConsumer::*)(), 
boost::python::return_value_policy<manage_new_Message, 
boost::python::default_call_policies>, 
boost::mpl::vector2<cms::Message*, cms::MessageConsumer&> >]’
src/main/MessageConsumer.cpp:85:   instantiated from here
../activemq-cpp/src/main/boost/python/detail/caller.hpp:102: error: ‘struct 
to_python_Message<cms::Message*>’ has no member named ‘get_pytype’
lipo: can't figure out the architecture type of: 
/var/folders/19/19LcQO4hHs8lWkK6nAZHnU+++TI/-Tmp-
//ccft0Iyd.out
error: command 'gcc' failed with exit status 1

What version of the product are you using? On what operating system?
MacBook Pro OS X 10.5.2
Python 2.5.2 Stackless 3.1b3 060516 (python-2.52:61022, Feb 27 2008, 16:52:03) 
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

Please provide any additional information below.

Original issue reported on code.google.com by thijs.triemstra@gmail.com on 23 May 2008 at 10:24

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
What version of Boost.Python do you have?

Original comment by fullung@gmail.com on 23 May 2008 at 1:49

GoogleCodeExporter commented 8 years ago
$ bjam -v
Boost.Jam  Version 3.1.15. OS=MACOSX.
   Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.  
   Copyright 2001 David Turner.
   Copyright 2001-2004 David Abrahams.
   Copyright 2002-2005 Rene Rivera.
   Copyright 2003-2005 Vladimir Prus.

$ ls -l /usr/local/lib/libboost_*
-rwxr-xr-x  1 root  wheel    84636  4 apr 22:40 
/usr/local/lib/libboost_date_time-mt-1_35.dylib
-rwxr-xr-x  1 root  wheel    78952  4 apr 22:40 
/usr/local/lib/libboost_filesystem-mt-1_35.dylib
-rwxr-xr-x  1 root  wheel  1052176  4 apr 22:41 
/usr/local/lib/libboost_graph-mt-1_35.dylib
-rwxr-xr-x  1 root  wheel    55896  4 apr 22:41 
/usr/local/lib/libboost_iostreams-mt-1_35.dylib
-rwxr-xr-x  1 root  wheel    47296  4 apr 22:35 
/usr/local/lib/libboost_prg_exec_monitor-mt-1_35.dylib
-rwxr-xr-x  1 root  wheel   283960  4 apr 22:42 
/usr/local/lib/libboost_program_options-mt-1_35.dylib
-rwxr-xr-x  1 root  wheel   316892 23 mei 08:16 
/usr/local/lib/libboost_python-1_35.dylib
-rwxr-xr-x  1 root  wheel   467568  4 apr 22:44 
/usr/local/lib/libboost_python-mt-1_35.dylib
-rwxr-xr-x  1 root  wheel   690044  4 apr 22:34 
/usr/local/lib/libboost_serialization-mt-1_35.dylib
-rwxr-xr-x  1 root  wheel   102824  4 apr 22:35 
/usr/local/lib/libboost_signals-mt-1_35.dylib
-rwxr-xr-x  1 root  wheel    30408  4 apr 22:40 
/usr/local/lib/libboost_system-mt-1_35.dylib
-rw-r--r--  2 root  wheel  2752276  4 apr 22:36 
/usr/local/lib/libboost_test_exec_monitor-mt-1_35.a
-rw-r--r--  2 root  wheel  2752276  4 apr 22:36 
/usr/local/lib/libboost_test_exec_monitor-mt.a
-rwxr-xr-x  1 root  wheel    97228  4 apr 22:37 
/usr/local/lib/libboost_thread-mt-1_35.dylib
-rwxr-xr-x  1 root  wheel   422476  4 apr 22:37 
/usr/local/lib/libboost_unit_test_framework-mt-1_35.dylib
-rwxr-xr-x  1 root  wheel  1890264  4 apr 22:40 
/usr/local/lib/libboost_wave-mt-1_35.dylib
-rwxr-xr-x  1 root  wheel   611264  4 apr 22:35 
/usr/local/lib/libboost_wserialization-mt-1_35.dylib

Original comment by thijs.triemstra@gmail.com on 25 May 2008 at 9:06

GoogleCodeExporter commented 8 years ago
Okay, looks like the to_python_Message struct needs a member called get_pytype.

This might be something new in Boost 1.35, or maybe something is going subtly 
wrong
with the combination of pyactivemq, Apple's GCC and Boost.Python.

I'll take a look.

Original comment by fullung@gmail.com on 25 May 2008 at 9:25

GoogleCodeExporter commented 8 years ago

Original comment by fullung@gmail.com on 25 May 2008 at 9:41

GoogleCodeExporter commented 8 years ago
Thanks for your quick response! Let me know if I can test anything. I would 
like to add a howto build for mac osx 
in the wiki but it seems there's no way for me to edit the wiki page without 
permissions from the project owner?

Original comment by thijs.triemstra@gmail.com on 25 May 2008 at 9:47

GoogleCodeExporter commented 8 years ago
The Building page on the wiki needs a serious update anyway, since the build 
process
for AMQCPP has changed a lot since the last time I worked on pyactivemq (a 
dependency
on APR has been added).

Once I have this issue and issue #7 sorted out, I'll look at fixing the Building
page. At that point I'll coordinate with you to get any info specific to Mac OS 
X
included.

Original comment by fullung@gmail.com on 25 May 2008 at 9:51

GoogleCodeExporter commented 8 years ago
This problems seem to be related to the new BOOST_PYTHON_NO_PY_SIGNATURES define
described here:

http://www.boost.org/doc/libs/1_35_0/libs/python/doc/news.html

I haven't looked at what exactly this does in-depth, but defining
BOOST_PYTHON_NO_PY_SIGNATURES seems to fix the problems with Boost 1.35.0.

setup.py will still need a few tweaks (mostly APR-related) to build against 
AMQCPP
trunk, but the changes I've committed should solve the specific problem you 
reported
here.

Original comment by fullung@gmail.com on 25 May 2008 at 10:38

GoogleCodeExporter commented 8 years ago
I updated to r155 and unfortunately the build failed again, this time with a 
different error:

$ python setup.py build
running build
running build_ext
building 'pyactivemq' extension
creating build
creating build/temp.macosx-10.3-i386-2.5
creating build/temp.macosx-10.3-i386-2.5/src
creating build/temp.macosx-10.3-i386-2.5/src/main
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic 
-DNDEBUG -g -O3 -DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/ActiveMQConnectionFactory.cpp -o build/temp.macosx-10.3-i386-
2.5/src/main/ActiveMQConnectionFactory.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic 
-DNDEBUG -g -O3 -DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/BytesMessage.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/BytesMessage.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic 
-DNDEBUG -g -O3 -DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/CMSException.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/CMSException.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic 
-DNDEBUG -g -O3 -DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/Connection.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/Connection.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic 
-DNDEBUG -g -O3 -DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/ConnectionFactory.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/ConnectionFactory.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic 
-DNDEBUG -g -O3 -DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/Destinations.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/Destinations.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic 
-DNDEBUG -g -O3 -DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/ExceptionListener.cpp 
-o build/temp.macosx-10.3-i386-2.5/src/main/ExceptionListener.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic 
-DNDEBUG -g -O3 -DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/MapMessage.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/MapMessage.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic 
-DNDEBUG -g -O3 -DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/Message.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/Message.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic 
-DNDEBUG -g -O3 -DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/MessageConsumer.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/MessageConsumer.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic 
-DNDEBUG -g -O3 -DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/MessageListener.cpp 
-o build/temp.macosx-10.3-i386-2.5/src/main/MessageListener.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic 
-DNDEBUG -g -O3 -DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/MessageProducer.cpp 
-o build/temp.macosx-10.3-i386-2.5/src/main/MessageProducer.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic 
-DNDEBUG -g -O3 -DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/pyactivemq.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/pyactivemq.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic 
-DNDEBUG -g -O3 -DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/Session.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/Session.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -
DSTACKLESS_FRHACK=1 -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic 
-DNDEBUG -g -O3 -DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/TextMessage.cpp -o 
build/temp.macosx-10.3-i386-2.5/src/main/TextMessage.o
creating build/lib.macosx-10.3-i386-2.5
g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle 
-undefined 
dynamic_lookup 
build/temp.macosx-10.3-i386-2.5/src/main/ActiveMQConnectionFactory.o 
build/temp.macosx-10.3-i386-2.5/src/main/BytesMessage.o 
build/temp.macosx-10.3-i386-
2.5/src/main/CMSException.o 
build/temp.macosx-10.3-i386-2.5/src/main/Connection.o 
build/temp.macosx-10.3-i386-2.5/src/main/ConnectionFactory.o 
build/temp.macosx-10.3-i386-
2.5/src/main/Destinations.o 
build/temp.macosx-10.3-i386-2.5/src/main/ExceptionListener.o 
build/temp.macosx-10.3-i386-2.5/src/main/MapMessage.o 
build/temp.macosx-10.3-i386-
2.5/src/main/Message.o 
build/temp.macosx-10.3-i386-2.5/src/main/MessageConsumer.o 
build/temp.macosx-10.3-i386-2.5/src/main/MessageListener.o 
build/temp.macosx-10.3-i386-
2.5/src/main/MessageProducer.o 
build/temp.macosx-10.3-i386-2.5/src/main/pyactivemq.o 
build/temp.macosx-10.3-i386-2.5/src/main/Session.o build/temp.macosx-10.3-i386-
2.5/src/main/TextMessage.o -L/Users/thijstriemstra/opt/lib -lactivemq-cpp 
-luuid -lboost_python -o 
build/lib.macosx-10.3-i386-2.5/pyactivemq.so
ld: library not found for -luuid
collect2: ld returned 1 exit status
ld: library not found for -luuid
collect2: ld returned 1 exit status
lipo: can't open input file: 
/var/folders/19/19LcQO4hHs8lWkK6nAZHnU+++TI/-Tmp-//ccsefNqV.out (No 
such file or directory)
error: command 'g++' failed with exit status 1

Is this related to a missing uuid tool? I don't remember installing it (because 
I thought it's already present on 
osx by default) but I'll give that a try first. 

Original comment by thijs.triemstra@gmail.com on 26 May 2008 at 2:14

GoogleCodeExporter commented 8 years ago
Solved the previous problem by downloading and installing e2fsprogs 1.40.6 like 
this:

curl -O 
http://kent.dl.sourceforge.net/sourceforge/e2fsprogs/e2fsprogs-1.40.6.tar.gz
tar xf e2fsprogs-1.40.6.tar.gz
cd e2fsprogs-1.40.6
mkdir build
cd build
../configure --enable-bsd-shlibs
make
sudo make install-libs

Both the newer e2fsprogs 1.40.8 and 1.40.10 threw this error while compiling:

../../misc/ismounted.c:89: warning: assignment makes pointer from integer 
without a cast
    LD fsck
Undefined symbols:
  "_setmntent", referenced from:
      _is_mounted in ismounted.o
  "_endmntent", referenced from:
      _is_mounted in ismounted.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [fsck] Error 1
make[1]: *** [all-progs-recursive] Error 1
make: *** [all] Error 2

When I now try to compile pyactivemq it ends with this error:

creating build/lib.macosx-10.3-i386-2.5
g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle 
-undefined dynamic_lookup 
build/temp.macosx-10.3-i386-2.5/src/main/ActiveMQConnectionFactory.o 
build/temp.macosx-10.3-i386-
2.5/src/main/BytesMessage.o 
build/temp.macosx-10.3-i386-2.5/src/main/CMSException.o 
build/temp.macosx-10.3-i386-2.5/src/main/Connection.o 
build/temp.macosx-10.3-i386-
2.5/src/main/ConnectionFactory.o 
build/temp.macosx-10.3-i386-2.5/src/main/Destinations.o 
build/temp.macosx-10.3-i386-2.5/src/main/ExceptionListener.o 
build/temp.macosx-10.3-i386-
2.5/src/main/MapMessage.o build/temp.macosx-10.3-i386-2.5/src/main/Message.o 
build/temp.macosx-10.3-
i386-2.5/src/main/MessageConsumer.o 
build/temp.macosx-10.3-i386-2.5/src/main/MessageListener.o 
build/temp.macosx-10.3-i386-2.5/src/main/MessageProducer.o 
build/temp.macosx-10.3-i386-
2.5/src/main/pyactivemq.o build/temp.macosx-10.3-i386-2.5/src/main/Session.o 
build/temp.macosx-10.3-
i386-2.5/src/main/TextMessage.o -L/Users/thijstriemstra/opt/lib -lactivemq-cpp 
-luuid -lboost_python -o 
build/lib.macosx-10.3-i386-2.5/pyactivemq.so
ld: library not found for -lboost_python
collect2: ld returned 1 exit status
ld: library not found for -lboost_python
collect2: ld returned 1 exit status
lipo: can't open input file: 
/var/folders/19/19LcQO4hHs8lWkK6nAZHnU+++TI/-Tmp-//cc4Rd0Im.out (No such 
file or directory)
error: command 'g++' failed with exit status 1

Original comment by thijs.triemstra@gmail.com on 26 May 2008 at 2:50

GoogleCodeExporter commented 8 years ago
Got rid of the previous error message by running this from /usr/local/lib:

sudo ln -s /usr/local/lib/libboost_python-1_35.dylib libboost_python.dylib

but now getting this error:

creating build/lib.macosx-10.3-i386-2.5
g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle 
-undefined 
dynamic_lookup -arch 
build/temp.macosx-10.3-i386-2.5/src/main/ActiveMQConnectionFactory.o 
build/temp.macosx-10.3-i386-2.5/src/main/BytesMessage.o 
build/temp.macosx-10.3-i386-
2.5/src/main/CMSException.o 
build/temp.macosx-10.3-i386-2.5/src/main/Connection.o 
build/temp.macosx-10.3-i386-2.5/src/main/ConnectionFactory.o 
build/temp.macosx-10.3-i386-
2.5/src/main/Destinations.o 
build/temp.macosx-10.3-i386-2.5/src/main/ExceptionListener.o 
build/temp.macosx-10.3-i386-2.5/src/main/MapMessage.o 
build/temp.macosx-10.3-i386-
2.5/src/main/Message.o 
build/temp.macosx-10.3-i386-2.5/src/main/MessageConsumer.o 
build/temp.macosx-10.3-i386-2.5/src/main/MessageListener.o 
build/temp.macosx-10.3-i386-
2.5/src/main/MessageProducer.o 
build/temp.macosx-10.3-i386-2.5/src/main/pyactivemq.o 
build/temp.macosx-10.3-i386-2.5/src/main/Session.o build/temp.macosx-10.3-i386-
2.5/src/main/TextMessage.o -L/Users/thijstriemstra/opt/lib -lactivemq-cpp 
-luuid -lboost_python -o 
build/lib.macosx-10.3-i386-2.5/pyactivemq.so
g++-4.0: Invalid arch name : 
build/temp.macosx-10.3-i386-2.5/src/main/ActiveMQConnectionFactory.o
error: command 'g++' failed with exit status 1
ld: warning in /Users/thijstriemstra/opt/lib/libactivemq-cpp.dylib, file is not 
of required architecture
ld: warning in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libuuid.a, file is 
not of required architecture
ld: warning in 
/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libboost_python.dylib, file is 
not of required 
architecture

Original comment by thijs.triemstra@gmail.com on 26 May 2008 at 3:31

GoogleCodeExporter commented 8 years ago
Some debug info for the issue described in the previous comment:

$ file pyactivemq.so 
pyactivemq.so: Mach-O universal binary with 2 architectures
pyactivemq.so (for architecture i386):  Mach-O bundle i386
pyactivemq.so (for architecture ppc):   Mach-O bundle ppc

$ file *.dylib
libactivemq-cpp-2.2-SNAPSHOT.2.0.2.dylib: Mach-O dynamically linked shared 
library i386
libactivemq-cpp-2.2-SNAPSHOT.2.dylib:     Mach-O dynamically linked shared 
library i386
libactivemq-cpp.dylib:                    Mach-O dynamically linked shared 
library i386

So I need to figure out how to build a universal version of activemq-cpp or a 
i386-only version of pyactivemq..?

Original comment by thijs.triemstra@gmail.com on 26 May 2008 at 4:48

GoogleCodeExporter commented 8 years ago
Looks like Boost was compiled for i386 only as well so a intel only build of 
pyactivemq makes most sense for 
me at the moment I guess..

$ file /usr/local/lib/libboost_*

/usr/local/lib/libboost_date_time-mt-1_35.dylib:           Mach-O dynamically 
linked shared library i386
/usr/local/lib/libboost_filesystem-mt-1_35.dylib:          Mach-O dynamically 
linked shared library i386
/usr/local/lib/libboost_graph-mt-1_35.dylib:               Mach-O dynamically 
linked shared library i386
/usr/local/lib/libboost_iostreams-mt-1_35.dylib:           Mach-O dynamically 
linked shared library i386
/usr/local/lib/libboost_prg_exec_monitor-mt-1_35.dylib:    Mach-O dynamically 
linked shared library i386
/usr/local/lib/libboost_program_options-mt-1_35.dylib:     Mach-O dynamically 
linked shared library i386
/usr/local/lib/libboost_python-1_35.dylib:                 Mach-O dynamically 
linked shared library i386
/usr/local/lib/libboost_python-mt-1_35.dylib:              Mach-O dynamically 
linked shared library i386
/usr/local/lib/libboost_python.dylib:                      Mach-O dynamically 
linked shared library i386
/usr/local/lib/libboost_serialization-mt-1_35.dylib:       Mach-O dynamically 
linked shared library i386
/usr/local/lib/libboost_signals-mt-1_35.dylib:             Mach-O dynamically 
linked shared library i386
/usr/local/lib/libboost_system-mt-1_35.dylib:              Mach-O dynamically 
linked shared library i386
/usr/local/lib/libboost_test_exec_monitor-mt-1_35.a:       current ar archive
/usr/local/lib/libboost_test_exec_monitor-mt.a:            current ar archive
/usr/local/lib/libboost_thread-mt-1_35.dylib:              Mach-O dynamically 
linked shared library i386
/usr/local/lib/libboost_unit_test_framework-mt-1_35.dylib: Mach-O dynamically 
linked shared library i386
/usr/local/lib/libboost_wave-mt-1_35.dylib:                Mach-O dynamically 
linked shared library i386
/usr/local/lib/libboost_wserialization-mt-1_35.dylib:      Mach-O dynamically 
linked shared library i386

Original comment by thijs.triemstra@gmail.com on 26 May 2008 at 4:54

GoogleCodeExporter commented 8 years ago
Thanks for all the feedback. Is it working yet?

Remember, you might find it easier to edit the paths and library names in 
setup.py,
rather than trying to configure your system to match what setup.py expects 
(which is
mostly based on what worked on my Linux system).

Also take a look at MacPorts:

http://www.macports.org/ports.php

Looks like the easiest way to get binaries for e2fsprogs and Boost.

Original comment by fullung@gmail.com on 26 May 2008 at 5:46

GoogleCodeExporter commented 8 years ago
No, it's not working yet. I created this bash file:

{{{
#!/bin/bash

ARCH="i386"
SDKPATH="/Developer/SDKs/MacOSX10.5.sdk"
OS_TARGET="10.5"

CFLAGS="-arch ${ARCH} -mmacosx-version-min=10.5 -isysroot ${SDKPATH}"; export 
CFLAGS
LDFLAGS="-arch ${ARCH}"; export LDFLAGS
MACOSX_DEPLOYMENT_TARGET="${OS_TARGET}"; export MACOSX_DEPLOYMENT_TARGET

rm -rf build
python setup.py build
}}}

Which produces the following output:

{{{
running build
running build_ext
building 'pyactivemq' extension
creating build
creating build/temp.macosx-10.5-fat-2.5
creating build/temp.macosx-10.5-fat-2.5/src
creating build/temp.macosx-10.5-fat-2.5/src/main
gcc -DNDEBUG -g -O3 -arch i386 -mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk -
DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/ActiveMQConnectionFactory.cpp -o 
build/temp.macosx-10.5-fat-2.5/src/main/ActiveMQConnectionFactory.o
gcc -DNDEBUG -g -O3 -arch i386 -mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk -
DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/BytesMessage.cpp -o build/temp.macosx-
10.5-fat-2.5/src/main/BytesMessage.o
gcc -DNDEBUG -g -O3 -arch i386 -mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk -
DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/CMSException.cpp -o build/temp.macosx-
10.5-fat-2.5/src/main/CMSException.o
gcc -DNDEBUG -g -O3 -arch i386 -mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk -
DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/Connection.cpp -o build/temp.macosx-
10.5-fat-2.5/src/main/Connection.o
gcc -DNDEBUG -g -O3 -arch i386 -mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk -
DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/ConnectionFactory.cpp -o 
build/temp.macosx-10.5-fat-2.5/src/main/ConnectionFactory.o
gcc -DNDEBUG -g -O3 -arch i386 -mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk -
DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/Destinations.cpp -o build/temp.macosx-
10.5-fat-2.5/src/main/Destinations.o
gcc -DNDEBUG -g -O3 -arch i386 -mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk -
DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/ExceptionListener.cpp -o 
build/temp.macosx-10.5-fat-2.5/src/main/ExceptionListener.o
gcc -DNDEBUG -g -O3 -arch i386 -mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk -
DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/MapMessage.cpp -o build/temp.macosx-
10.5-fat-2.5/src/main/MapMessage.o
gcc -DNDEBUG -g -O3 -arch i386 -mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk -
DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/Message.cpp -o build/temp.macosx-10.5-
fat-2.5/src/main/Message.o
gcc -DNDEBUG -g -O3 -arch i386 -mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk -
DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/MessageConsumer.cpp -o 
build/temp.macosx-10.5-fat-2.5/src/main/MessageConsumer.o
gcc -DNDEBUG -g -O3 -arch i386 -mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk -
DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/MessageListener.cpp -o 
build/temp.macosx-10.5-fat-2.5/src/main/MessageListener.o
gcc -DNDEBUG -g -O3 -arch i386 -mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk -
DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/MessageProducer.cpp -o 
build/temp.macosx-10.5-fat-2.5/src/main/MessageProducer.o
gcc -DNDEBUG -g -O3 -arch i386 -mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk -
DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/pyactivemq.cpp -o build/temp.macosx-
10.5-fat-2.5/src/main/pyactivemq.o
gcc -DNDEBUG -g -O3 -arch i386 -mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk -
DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/Session.cpp -o build/temp.macosx-10.5-
fat-2.5/src/main/Session.o
gcc -DNDEBUG -g -O3 -arch i386 -mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk -
DBOOST_PYTHON_NO_PY_SIGNATURES=1 -I../activemq-cpp/src/main -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c 
src/main/TextMessage.cpp -o build/temp.macosx-
10.5-fat-2.5/src/main/TextMessage.o
creating build/lib.macosx-10.5-fat-2.5
g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle 
-undefined dynamic_lookup -arch i386 -arch 
i386 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk 
build/temp.macosx-10.5-fat-
2.5/src/main/ActiveMQConnectionFactory.o 
build/temp.macosx-10.5-fat-2.5/src/main/BytesMessage.o build/temp.macosx-
10.5-fat-2.5/src/main/CMSException.o 
build/temp.macosx-10.5-fat-2.5/src/main/Connection.o build/temp.macosx-10.5-fat-
2.5/src/main/ConnectionFactory.o 
build/temp.macosx-10.5-fat-2.5/src/main/Destinations.o 
build/temp.macosx-10.5-fat-
2.5/src/main/ExceptionListener.o 
build/temp.macosx-10.5-fat-2.5/src/main/MapMessage.o build/temp.macosx-10.5-fat-
2.5/src/main/Message.o 
build/temp.macosx-10.5-fat-2.5/src/main/MessageConsumer.o 
build/temp.macosx-10.5-fat-
2.5/src/main/MessageListener.o 
build/temp.macosx-10.5-fat-2.5/src/main/MessageProducer.o 
build/temp.macosx-10.5-fat-
2.5/src/main/pyactivemq.o build/temp.macosx-10.5-fat-2.5/src/main/Session.o 
build/temp.macosx-10.5-fat-
2.5/src/main/TextMessage.o -L/Users/thijstriemstra/opt/lib -lactivemq-cpp 
-luuid -lboost_python -o build/lib.macosx-10.5-
fat-2.5/pyactivemq.so
ld: warning in 
build/temp.macosx-10.5-fat-2.5/src/main/ActiveMQConnectionFactory.o, file is 
not of required architecture
ld: warning in build/temp.macosx-10.5-fat-2.5/src/main/BytesMessage.o, file is 
not of required architecture
ld: warning in build/temp.macosx-10.5-fat-2.5/src/main/CMSException.o, file is 
not of required architecture
ld: warning in build/temp.macosx-10.5-fat-2.5/src/main/Connection.o, file is 
not of required architecture
ld: warning in build/temp.macosx-10.5-fat-2.5/src/main/ConnectionFactory.o, 
file is not of required architecture
ld: warning in build/temp.macosx-10.5-fat-2.5/src/main/Destinations.o, file is 
not of required architecture
ld: warning in build/temp.macosx-10.5-fat-2.5/src/main/ExceptionListener.o, 
file is not of required architecture
ld: warning in build/temp.macosx-10.5-fat-2.5/src/main/MapMessage.o, file is 
not of required architecture
ld: warning in build/temp.macosx-10.5-fat-2.5/src/main/Message.o, file is not 
of required architecture
ld: warning in build/temp.macosx-10.5-fat-2.5/src/main/MessageConsumer.o, file 
is not of required architecture
ld: warning in build/temp.macosx-10.5-fat-2.5/src/main/MessageListener.o, file 
is not of required architecture
ld: warning in build/temp.macosx-10.5-fat-2.5/src/main/MessageProducer.o, file 
is not of required architecture
ld: warning in build/temp.macosx-10.5-fat-2.5/src/main/pyactivemq.o, file is 
not of required architecture
ld: warning in build/temp.macosx-10.5-fat-2.5/src/main/Session.o, file is not 
of required architecture
ld: warning in build/temp.macosx-10.5-fat-2.5/src/main/TextMessage.o, file is 
not of required architecture
ld: warning in /Users/thijstriemstra/opt/lib/libactivemq-cpp.dylib, file is not 
of required architecture
ld: warning in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libuuid.a, file is 
not of required architecture
ld: warning in 
/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libboost_python.dylib, file is 
not of required architecture
}}}

So it looks like gcc is respecting the CFFLAGS, which produces i386 only .o 
files, but the final g++ appends those CFFLAGS but still 
sticks to the -arch ppc -arch i386 arguments :-/

I'm not really a fan of Macports and if we consider using pyactivemq we want to 
make a custom build for our software anyway. 

Original comment by thijs.triemstra@gmail.com on 26 May 2008 at 5:59

GoogleCodeExporter commented 8 years ago
Looks like you're close.

I've never used Mac OS X, so I can't really offer much help at this point. 
Looks like
you need to do some research about how distutils works with universal vs i386
binaries, or something like that.

Original comment by fullung@gmail.com on 26 May 2008 at 6:05

GoogleCodeExporter commented 8 years ago
Thanks for the suggestions. I looked through the distutils and it looks like we 
need something like the 
"extra_compile_args" but instead of adding them as extra args they should 
replace the existing args. I think 
the existing args (containing '-arch ppc etc') are hardcoded in the python 2.5 
lib somewhere, and I'll see if I 
can find them so you can comment them out (yep nasty hack) when building 
pyactivemq. Another solution is 
manually executing the last command that fails with distutils, and removing the 
'-arch i386 -arch ppc -
isysroot /Developer/SDKs/MacOSX10.4u.sdk' stuff like this:

g++-4.0 -g -bundle -undefined dynamic_lookup -arch i386 
-mmacosx-version-min=10.5 -isysroot 
/Developer/SDKs/MacOSX10.5.sdk build/temp.macosx-10.5-fat-
2.5/src/main/ActiveMQConnectionFactory.o 
build/temp.macosx-10.5-fat-2.5/src/main/BytesMessage.o 
build/temp.macosx-10.5-fat-2.5/src/main/CMSException.o 
build/temp.macosx-10.5-fat-
2.5/src/main/Connection.o 
build/temp.macosx-10.5-fat-2.5/src/main/ConnectionFactory.o 
build/temp.macosx-10.5-fat-2.5/src/main/Destinations.o 
build/temp.macosx-10.5-fat-
2.5/src/main/ExceptionListener.o 
build/temp.macosx-10.5-fat-2.5/src/main/MapMessage.o 
build/temp.macosx-10.5-fat-2.5/src/main/Message.o build/temp.macosx-10.5-fat-
2.5/src/main/MessageConsumer.o 
build/temp.macosx-10.5-fat-2.5/src/main/MessageListener.o 
build/temp.macosx-10.5-fat-2.5/src/main/MessageProducer.o 
build/temp.macosx-10.5-fat-
2.5/src/main/pyactivemq.o build/temp.macosx-10.5-fat-2.5/src/main/Session.o 
build/temp.macosx-10.5-
fat-2.5/src/main/TextMessage.o -L/Users/thijstriemstra/opt/lib -lactivemq-cpp 
-luuid -lboost_python -o 
build/lib.macosx-10.5-fat-2.5/pyactivemq.so

This creates the correct .so:

$ file build/lib.macosx-10.5-fat-2.5/pyactivemq.so
build/lib.macosx-10.5-fat-2.5/pyactivemq.so: Mach-O bundle i386

Original comment by thijs.triemstra@gmail.com on 26 May 2008 at 6:41

GoogleCodeExporter commented 8 years ago
The solution in the previous comment didn't really work out after all. I 
decided to ask around on the boost irc  
channel and there they told me to use './configure architecture=combined 
toolset=darwin' when building Boost, 
which creates a universal .so that works. Guess you can consider this ticket 
closed, cheers.

Original comment by thijs.triemstra@gmail.com on 26 May 2008 at 8:50

GoogleCodeExporter commented 8 years ago

Original comment by fullung@gmail.com on 27 May 2008 at 6:58

GoogleCodeExporter commented 8 years ago
To clarify comment 18: the build fails with the error below but copying the .so 
file to site-packages and then 
importing with Python it doesn't throw any errors. Kinda strange but it works :)

ld: warning in /Users/thijstriemstra/opt/lib/libactivemq-cpp.dylib, file is not 
of required architecture
ld: warning in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libuuid.a, file is 
not of required architecture
ld: warning in 
/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libboost_python.dylib, file is 
not of required 
architecture

$ file build/lib.macosx-10.3-i386-2.5/pyactivemq.so 
build/lib.macosx-10.3-i386-2.5/pyactivemq.so: Mach-O universal binary with 2 
architectures
build/lib.macosx-10.3-i386-2.5/pyactivemq.so (for architecture i386):   Mach-O 
bundle i386
build/lib.macosx-10.3-i386-2.5/pyactivemq.so (for architecture ppc):    Mach-O 
bundle ppc

Original comment by thijs.triemstra@gmail.com on 27 May 2008 at 8:35