[Zope] MySQL-python-1.2.2 breaks compiling on Mac OS X 10.5 (Andy Dustman?)

Hugo Ramos ramosh at gmail.com
Thu Feb 21 04:22:26 EST 2008


Hello David,

It makes sense to me! The only thing I was using as a binary was
Python 2.4.4 universal binary.
I guess if I was using Python from the source it should work then.

Thank you very much.

Hugo


On Thu, Feb 21, 2008 at 3:01 AM, David Pratt <fairwinds at eastlink.ca> wrote:
> Hi Hugo. I believe 'file is not of required architecture' may be the
>  clue here. Ever since mac went to universal binaries, folks with ppc
>  have been having trouble since it is compiled with i386 arch flags and
>  vice versa for folks with intel macs (with ppc arch flags). The only way
>  to get around this is to compile a universal build, use universal
>  binaries, or build for your own architecture. There is a large amount of
>  software out there that does not do the right thing.
>
>  For myself, I build my own software including python and I try and keep
>  away from the universal insanity. On a mac, many folks use macports
>  without the universal build. If you choose to build your own software,
>  you can place it in the /opt directory to prevent it from affecting your
>  system software. This is where your macports software will go if you use
>  it. You will also need to modify your path to ensure that your compiled
>  software is obtained over system software.
>
>  I see that your issue was solved with a universal build. This probably
>  just confirms what I have written. This may be alright until you run
>  into the next snag with something else you need to compile. Personally,
>  I got tired of the consistent problems trying to build software with the
>  universal python.
>
>  Regards,
>  David
>
>
>
>  Hugo Ramos wrote:
>  > Hello Chetan,
>  >
>  > Well thank you very much! I must be very tired to forget to compile
>  > MySQL without --enable-thread-safe-client !!!
>  > It seems that MySQL-python now compiles with a warning:
>  >
>  > ld: warning in /usr/local/mysql/lib/mysql/libmysqlclient_r.dylib, file
>  > is not of required architecture
>  >
>  > But when I try to import _mysql in Python 2.4.4 shell it seems to
>  > import the module with no errors.
>  >
>  > After that when I try to import ZMySQLDA 2.0.8 in Zope 2.10.5 I
>  > receive the following error:
>  >
>  > ===============================
>  > 2008-02-20 11:41:52 ERROR Application Could not import Products.ZMySQLDA
>  > Traceback (most recent call last):
>  >   File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line
>  > 709, in import_product
>  >     product=__import__(pname, global_dict, global_dict, silly)
>  >   File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py",
>  > line 91, in ?
>  >     import DA
>  >   File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, in ?
>  >     from db import DB
>  >   File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, in ?
>  >     import _mysql
>  >   File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ?
>  >   File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in __bootstrap__
>  > ImportError: Inappropriate file type for dynamic loading
>  > Traceback (most recent call last):
>  >   File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 56, in ?
>  >     run()
>  >   File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 21, in run
>  >     starter.prepare()
>  >   File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py",
>  > line 102, in prepare
>  >     self.startZope()
>  >   File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py",
>  > line 278, in startZope
>  >     Zope2.startup()
>  >   File "/usr/local/zope2.10.5/lib/python/Zope2/__init__.py", line 47, in startup
>  >     _startup()
>  >   File "/usr/local/zope2.10.5/lib/python/Zope2/App/startup.py", line
>  > 45, in startup
>  >     OFS.Application.import_products()
>  >   File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line
>  > 686, in import_products
>  >     import_product(product_dir, product_name, raise_exc=debug_mode)
>  >   File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line
>  > 709, in import_product
>  >     product=__import__(pname, global_dict, global_dict, silly)
>  >   File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py",
>  > line 91, in ?
>  >     import DA
>  >   File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, in ?
>  >     from db import DB
>  >   File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, in ?
>  >     import _mysql
>  >   File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ?
>  >   File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in __bootstrap__
>  > ImportError: Inappropriate file type for dynamic loading
>  > ===============================
>  >
>  > Any ideas?
>  >
>  > ps: I'm posting this to zope list because I'm sure there is more
>  > people with this problem.
>  >
>  >
>  > tia
>  >
>  > Hugo
>  >
>  >
>  > On Feb 20, 2008 10:35 AM, Chetan Kumar <chetan.mlist at gmail.com> wrote:
>  >> Hello
>  >> I understand.
>  >> If I could take the risk of "telling-the-obvious" what you need to do
>  >> is to recompile mysql so that mysqlclient_r libraries are also
>  >> created.
>  >> --enable-thread-safe-client is to be used while configuring the mysql
>  >> installation.
>  >> If that is done already, the LD_LIBRARY_PATH (or equivalent in your
>  >> case) if to set appropriately so that lmysqlclient_r is available for
>  >> linking.
>  >> Good luck
>  >> Chetan
>  >>
>  >
>  >
>  >
>



-- 
Hugo Ramos - ramosh at gmail.com
IT Project Manager

~~~~~~~~~~~~~~ @ ~~~~~~~~~~~~~~
http://www.orkut.com/Profile.aspx?uid=10082105466310142690
http://otuggapoesia.blogspot.com/
http://otugga.blogspot.com/


More information about the Zope mailing list