Project

General

Profile

Feature #692

Merge of Mac OSX support

Added by Lane, Peter almost 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Tunnell, Christopher
Category:
Build System
Target version:
Start date:
02 September 2011
Due date:
% Done:

100%

Estimated time:
Workflow:

Description

OS X support is in the branch lp:~plane1/maus/devel and appears to be ready to merge. I successfully executed the install_then_build_then_test.bash script on rgma16 and the last Jenkins build was successful as well.

#1

Updated by Tunnell, Christopher almost 12 years ago

Don't comment out lines and commit them please; just delete them since we have version control (see build_all.bash and SConstruct).

Merged it into trunk because looked good. Thanks!

r622

#2

Updated by Lane, Peter almost 12 years ago

Thanks for removing the commented lines. Sorry about that.

Should this issue be closed, or is there something else that needs to be done?

#3

Updated by Tunnell, Christopher over 11 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100
#4

Updated by Santos, Edward over 11 years ago

Hi! I'm getting this complain when installing_buiding_testing:

You need 'Python.h' to compile this program
If you want to install python locally, run:
MAUS_ROOT_DIR=/Users/edward/maus ./third_party/bash/01python.bash

Can't get over it. After doing the recommended installation, the same complain pops-up again.

Ideas?

#5

Updated by Tunnell, Christopher over 11 years ago

Maybe Peter can guess, but I think it only works at the moment on Snow Leopard (because ROOT doesn't work on Lion). What version of Mac are you using and are you trying with the trunk?

#6

Updated by Tunnell, Christopher over 11 years ago

What errors are popping up when trying to build Python?

#7

Updated by Santos, Edward over 11 years ago

Right, the python installation fails. I missed it cause i only read the last 3 lines. Here is the significant output:

/usr/bin/ranlib: file: libpython2.7.a(pymath.o) has no symbols
ranlib libpython2.7.a
ranlib: file: libpython2.7.a(pymath.o) has no symbols
/opt/local/bin/ginstall -c -d -m 755 Python.framework/Versions/2.7
if test ""; then \
gcc -o Python.framework/Versions/2.7/Python -dynamiclib \
-isysroot "" \
-all_load libpython2.7.a -Wl,-single_module \
-install_name /Users/edward/maus/third_party/install/Python.framework/Versions/2.7/Python \
-compatibility_version 2.7 \
-current_version 2.7; \
else \
/usr/bin/libtool -o Python.framework/Versions/2.7/Python -dynamic libpython2.7.a \
-lSystem -lSystemStubs -arch_only x86_64 -install_name /Users/edward/maus/third_party/install/Python.framework/Versions/2.7/Python -compatibility_version 2.7 -current_version 2.7 ;\
fi
Undefined symbols:
"_inflateEnd", referenced from:
Decomp_dealloc in libpython2.7.a(zlibmodule.o)
_PyZlib_unflush in libpython2.7.a(zlibmodule.o)
_PyZlib_decompress in libpython2.7.a(zlibmodule.o)
_PyZlib_decompress in libpython2.7.a(zlibmodule.o)
_PyZlib_decompress in libpython2.7.a(zlibmodule.o)
_PyZlib_decompress in libpython2.7.a(zlibmodule.o)
"_inflateInit2
", referenced from:
PyZlib_decompressobj in libpython2.7.a(zlibmodule.o)
_PyZlib_decompress in libpython2.7.a(zlibmodule.o)
"_deflate", referenced from:
_PyZlib_flush in libpython2.7.a(zlibmodule.o)
_PyZlib_flush in libpython2.7.a(zlibmodule.o)
_PyZlib_objcompress in libpython2.7.a(zlibmodule.o)
_PyZlib_objcompress in libpython2.7.a(zlibmodule.o)
_PyZlib_compress in libpython2.7.a(zlibmodule.o)
"_deflateEnd", referenced from:
_Comp_dealloc in libpython2.7.a(zlibmodule.o)
_PyZlib_flush in libpython2.7.a(zlibmodule.o)
_PyZlib_compress in libpython2.7.a(zlibmodule.o)
_PyZlib_compress in libpython2.7.a(zlibmodule.o)
_PyZlib_compress in libpython2.7.a(zlibmodule.o)
"_deflateInit2
", referenced from:
PyZlib_compressobj in libpython2.7.a(zlibmodule.o)
"_inflateCopy", referenced from:
_PyZlib_uncopy in libpython2.7.a(zlibmodule.o)
"_adler32", referenced from:
_PyZlib_adler32 in libpython2.7.a(zlibmodule.o)
"_crc32", referenced from:
_PyZlib_crc32 in libpython2.7.a(zlibmodule.o)
"_deflateCopy", referenced from:
_PyZlib_copy in libpython2.7.a(zlibmodule.o)
"_deflateInit
", referenced from:
PyZlib_compress in libpython2.7.a(zlibmodule.o)
"_inflate", referenced from:
_PyZlib_unflush in libpython2.7.a(zlibmodule.o)
_PyZlib_unflush in libpython2.7.a(zlibmodule.o)
_PyZlib_objdecompress in libpython2.7.a(zlibmodule.o)
_PyZlib_objdecompress in libpython2.7.a(zlibmodule.o)
_PyZlib_decompress in libpython2.7.a(zlibmodule.o)
ld: symbol(s) not found
/usr/bin/libtool: internal link edit command failed
make: * [Python.framework/Versions/2.7/Python] Error 1
INFO: Installing within MAUS's third party directory:
/opt/local/bin/ginstall -c -d -m 755 Python.framework/Versions/2.7
if test ""; then \
gcc -o Python.framework/Versions/2.7/Python -dynamiclib \
-isysroot "" \
-all_load libpython2.7.a -Wl,-single_module \
-install_name /Users/edward/maus/third_party/install/Python.framework/Versions/2.7/Python \
-compatibility_version 2.7 \
-current_version 2.7; \
else \
/usr/bin/libtool -o Python.framework/Versions/2.7/Python -dynamic libpython2.7.a \
-lSystem -lSystemStubs -arch_only x86_64 -install_name /Users/edward/maus/third_party/install/Python.framework/Versions/2.7/Python -compatibility_version 2.7 -current_version 2.7 ;\
fi
Undefined symbols:
"_inflateEnd", referenced from:
_Decomp_dealloc in libpython2.7.a(zlibmodule.o)
_PyZlib_unflush in libpython2.7.a(zlibmodule.o)
_PyZlib_decompress in libpython2.7.a(zlibmodule.o)
_PyZlib_decompress in libpython2.7.a(zlibmodule.o)
_PyZlib_decompress in libpython2.7.a(zlibmodule.o)
_PyZlib_decompress in libpython2.7.a(zlibmodule.o)
"_inflateInit2
", referenced from:
PyZlib_decompressobj in libpython2.7.a(zlibmodule.o)
_PyZlib_decompress in libpython2.7.a(zlibmodule.o)
"_deflate", referenced from:
_PyZlib_flush in libpython2.7.a(zlibmodule.o)
_PyZlib_flush in libpython2.7.a(zlibmodule.o)
_PyZlib_objcompress in libpython2.7.a(zlibmodule.o)
_PyZlib_objcompress in libpython2.7.a(zlibmodule.o)
_PyZlib_compress in libpython2.7.a(zlibmodule.o)
"_deflateEnd", referenced from:
_Comp_dealloc in libpython2.7.a(zlibmodule.o)
_PyZlib_flush in libpython2.7.a(zlibmodule.o)
_PyZlib_compress in libpython2.7.a(zlibmodule.o)
_PyZlib_compress in libpython2.7.a(zlibmodule.o)
_PyZlib_compress in libpython2.7.a(zlibmodule.o)
"_deflateInit2
", referenced from:
PyZlib_compressobj in libpython2.7.a(zlibmodule.o)
"_inflateCopy", referenced from:
_PyZlib_uncopy in libpython2.7.a(zlibmodule.o)
"_adler32", referenced from:
_PyZlib_adler32 in libpython2.7.a(zlibmodule.o)
"_crc32", referenced from:
_PyZlib_crc32 in libpython2.7.a(zlibmodule.o)
"_deflateCopy", referenced from:
_PyZlib_copy in libpython2.7.a(zlibmodule.o)
"_deflateInit
", referenced from:
_PyZlib_compress in libpython2.7.a(zlibmodule.o)
"_inflate", referenced from:
_PyZlib_unflush in libpython2.7.a(zlibmodule.o)
_PyZlib_unflush in libpython2.7.a(zlibmodule.o)
_PyZlib_objdecompress in libpython2.7.a(zlibmodule.o)
_PyZlib_objdecompress in libpython2.7.a(zlibmodule.o)
_PyZlib_decompress in libpython2.7.a(zlibmodule.o)
ld: symbol(s) not found
/usr/bin/libtool: internal link edit command failed
make: *
[Python.framework/Versions/2.7/Python] Error 1

INFO: The package should be locally build now in your
INFO: third_party directory, which the rest of MAUS will
INFO: find.

#8

Updated by Tunnell, Christopher over 11 years ago

But what version of MAUS ? Or Trunk?
What version of XCode?
What version of gcc? (gcc -v)
What version of Mac?

We can't repeat the problem without that. It works for two machines at least, but if it's not something simple I'll create (or you can) a support ticket with this info.

#9

Updated by Lane, Peter over 11 years ago

I can't test it since I only have access to 32-bit Macs, but I'm pretty sure the problem is the conditional in the 01python.bash script that decides whether to hack zlib into the build. This broke the build on Mac so I put in a check for 32-bit Darwin to avoid the hack. It seems that x86_64 needs to be exempt as well.

Edward, could you delete lines 51-57 of the file third_party/bash/01python.bash (I'm assuming this is the lp:maus branch) and try again. If that works I'll work with Chris to patch the trunk.

#10

Updated by Lane, Peter over 11 years ago

Better yet, Edward, could you just checkout the lp:~plane1/maus/devel branch and try that instead. I've just patched it. It's identical to the trunk aside from this change.

#11

Updated by Santos, Edward over 11 years ago

Neither of those worked... Will give more details later.

#12

Updated by Santos, Edward over 11 years ago

I'm going to paste the new error while building python:

/opt/local/bin/ginstall c -m 644 ./Resources/app/./Info.plist.in /Users/edward/maus/third_party/install/Python.framework/Versions/2.7/Resources/Python.app/Contents/.
/opt/local/bin/ginstall -c -m 644 ./Resources/app/./PkgInfo /Users/edward/maus/third_party/install/Python.framework/Versions/2.7/Resources/Python.app/Contents/.
/opt/local/bin/ginstall -c -m 644 ./Resources/app/Resources/PythonApplet.icns /Users/edward/maus/third_party/install/Python.framework/Versions/2.7/Resources/Python.app/Contents/Resources
/opt/local/bin/ginstall -c -m 644 ./Resources/app/Resources/PythonInterpreter.icns /Users/edward/maus/third_party/install/Python.framework/Versions/2.7/Resources/Python.app/Contents/Resources
/opt/local/bin/ginstall -c -s ../python.exe "/Users/edward/maus/third_party/install/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
sed -e "s!%bundleid%!org.python.python!g" \
-e "s!%version%!`DYLD_FRAMEWORK_PATH=/Users/edward/maus/third_party/build/Python-2.7: ../python.exe \
-c 'import platform; print(platform.python_version())'`!g" \
< "/Users/edward/maus/third_party/install/Python.framework/Versions/2.7/Resources/Python.app/Contents/Info.plist.in" \
> "/Users/edward/maus/third_party/install/Python.framework/Versions/2.7/Resources/Python.app/Contents/Info.plist"
rm "/Users/edward/maus/third_party/install/Python.framework/Versions/2.7/Resources/Python.app/Contents/Info.plist.in"
gcc -DPYTHONFRAMEWORK='"Python"' -o pythonw ./Tools/pythonw.c -I.. -I./../Include ../Python.framework/Versions/2.7/Python
/opt/local/bin/ginstall -c -s pythonw "/Users/edward/maus/third_party/install/Python.framework/Versions/2.7/bin/pythonw2.7"
/opt/local/bin/ginstall -c -s pythonw "/Users/edward/maus/third_party/install/Python.framework/Versions/2.7/bin/python2.7"
ln -sf python2.7 "/Users/edward/maus/third_party/install/Python.framework/Versions/2.7/bin/python"
ln -sf pythonw2.7 "/Users/edward/maus/third_party/install/Python.framework/Versions/2.7/bin/pythonw"
DYLD_FRAMEWORK_PATH=/Users/edward/maus/third_party/build/Python-2.7: ../python.exe ./scripts/BuildApplet.py \
--destroot "" \
--python=/Users/edward/maus/third_party/install/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python \
--output "/Applications/Python 2.7/Build Applet.app" \
./scripts/BuildApplet.py
cd PythonLauncher && make install DESTDIR=
sed 's/%VERSION%/'"`DYLD_FRAMEWORK_PATH=/Users/edward/maus/third_party/build/Python-2.7: ../../python.exe -c 'import platform; print platform.python_version()'`"'/g' < ./Info.plist.in > Info.plist
gcc -g -O2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -o FileSettings.o -c ./FileSettings.m
<built-in>:0: warning: Mac OS X version 10.5 or later is needed for use of the new objc abi
gcc -g -O2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -o MyAppDelegate.o -c ./MyAppDelegate.m
<built-in>:0: warning: Mac OS X version 10.5 or later is needed for use of the new objc abi
gcc -g -O2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -o MyDocument.o -c ./MyDocument.m
<built-in>:0: warning: Mac OS X version 10.5 or later is needed for use of the new objc abi
./MyDocument.m: In function ‘
[MyDocument close]’:
./MyDocument.m:40: warning: ‘-shouldTerminate’ not found in protocol(s)
./MyDocument.m: In function ‘-[MyDocument run]’:
./MyDocument.m:79: warning: ‘cString’ is deprecated (declared at /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:367)
./MyDocument.m: In function ‘-[MyDocument readFromFile:ofType:]’:
./MyDocument.m:112: warning: ‘-shouldShowUI’ not found in protocol(s)
gcc -g -O2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -o PreferencesWindowController.o -c ./PreferencesWindowController.m
<built-in>:0: warning: Mac OS X version 10.5 or later is needed for use of the new objc abi
gcc -g -O2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -o doscript.o -c ./doscript.m
<built-in>:0: warning: Mac OS X version 10.5 or later is needed for use of the new objc abi
gcc -g -O2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -o main.o -c ./main.m
<built-in>:0: warning: Mac OS X version 10.5 or later is needed for use of the new objc abi
gcc -o "Python Launcher" FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o -framework AppKit -framework Carbon
rm -fr "Python Launcher.app"
DYLD_FRAMEWORK_PATH=/Users/edward/maus/third_party/build/Python-2.7: ../../python.exe ./../../Lib/plat-mac/bundlebuilder.py \
--builddir=. \
--name="Python Launcher" \
--executable="Python Launcher" \
--iconfile=./../Icons/PythonLauncher.icns \
--bundle-id=org.python.PythonLauncher \
--resource=./../Icons/PythonSource.icns \
--resource=./../Icons/PythonCompiled.icns \
--resource=./English.lproj \
--resource=./factorySettings.plist \
--plist Info.plist \
build
Building './Python Launcher.app'
Copying files
Done.
find "Python Launcher.app" -name '.svn' -print0 | xargs -0 rm -r
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
make2: * [Python Launcher.app] Error 123
make1:
[install_PythonLauncher] Error 2
make: *
* [frameworkinstallapps] Error 2

INFO: The package should be locally build now in your
INFO: third_party directory, which the rest of MAUS will
INFO: find.

#13

Updated by Santos, Edward over 11 years ago

My system: Mac OS X 10.6.8, gcc version 4.2.1, Xcode version 3.2.5 (64-bit)

#14

Updated by Lane, Peter over 11 years ago

Did you follow the instructions at http://micewww.pp.rl.ac.uk/projects/maus/wiki/InstallMacOSX? There are some deviations from the standard installation instructions, namely the installation of some prerequisites. This includes Gnu xargs. The Mac version of xargs is handicapped, and it looks like this error might be from a failed use of xargs.

#15

Updated by Santos, Edward over 11 years ago

Hi, Peter... I have all those settings/pre-requisites you mentioned.

#16

Updated by Lane, Peter over 11 years ago

Unfortunately I don't know what else to do at this point. We don't have a 64-bit mac to test on, and if the patch didn't fix the Python build then I'm out of ideas. For now we'll just have to declare 64-bit macs as unsupported.

#17

Updated by Tunnell, Christopher over 11 years ago

We can sort out 64-bit Mac at the software workshop where there will be a few floating around I guess...

Thanks Peter!

#18

Updated by Rogers, Chris over 11 years ago

  • Target version changed from Future MAUS release to MAUS-v0.0.7

Also available in: Atom PDF