473,289 Members | 1,959 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

Mac OS distultils probelm

Hello there,

I'm working on a python extension module that I'm trying to install
using the distutils setup tools and I am running into a strange linker
problem. Here is the situation: I have a bunch of code (swig-wrapped C+
+ in this instance) that I want to compile into a module. The
compilation itself works just fine and so does the initial linking.
The linker command that distutils spits out looks somewhat like this

g++ -bundle -undefined dynamic_lookup mymodule_wrap.o -o
_mymodule.so -framework Carbon -framework Cocoa -framework
ApplicationServices -framework AGL -framework OpenGL -framework GLUT -
framework Cocoa /usr/lib/libz.dylib

However, when I load the module in python a whole bunch of system
symbols are undefined starting in this case with aglSwapBuffers

ImportError: dlopen(_mymodule.so, 2): Symbol not found:
_aglSwapBuffers
Referenced from: _mymodule.so Expected in: dynamic lookup

My understanding is that the _mymodule.so file should "know" that this
symbol came out of the AGL framework and thus look for it there. I
could understand if python wouldn't find the framework because of a
DYLD_LIBRARY_PATH issue or the like but here the problem seems to be
that the information from where the symbol came from is lost.

If I do a "more" on the _mymodule.so file that seems to be indeed what
happens. I see links to "/usr/lib/libz.dylib" and the system libraries
in there but none to the frameworks. However, now comes the really
interesting part. If I execute the *identical* command line from the
same shell I called "python setup.py install" from I get a different
library which *does* include the links to the frameworks. If I install
that file instead of the original everything works as expected.

So there seems to be a strange problem inside distutils. I looked at
that source code but couldn't make any sense out of it. Any idea of
what could cause this and how this could be fixed would be greatly
appreciated

Thanks
Timo

Jun 27 '08 #1
0 658

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: entoone | last post by:
I have a field called pword, whenever someone enters anything but numeric, i.e. mixed alpha with numeric, or even just alpha.. the following error appears. Warning: mysql_numrows(): supplied...
3
by: TL | last post by:
Please help. I need to get this problem resolved ... When I ran remote shell to a Sun Solaris 8 box from W2K box, the DOS' CMD window popped up and stayed there until CGI timeout. The funny...
1
by: danarz | last post by:
I am not what I am doing wrong. When I enter the log-in info and press submit, I keep getting the login section repeatedly (I never get loged-in). It works fine if I delete the php session lines....
1
by: james blair | last post by:
Hi I am having a problem executing following query: cursor.execute("select * from projects where projectid between '%s' and '%s'"%(id1,id2)) But say if i have projectid's from 1 to 20 in database...
9
by: Sebastian Faust | last post by:
Hi, I have a design problem about which I am thinking now for a while and still couldnt find any help in deja. What I need is something like a virtual function template. I know that this is not...
1
by: Smita | last post by:
hello ! > > > I am trying to intstall Mysql binary version with installor in Windows > XP machine . But it is not working . i have installed in the default > path ,in windows service componenet...
4
by: Yvan J. Gagnon | last post by:
I am encountering a strange problem in Netscape 7 with a CFM file I am trying to troubleshoot (the page is working fine in NS Communicator and IE). Below is a sample of the problematic line of...
1
by: fremenusul | last post by:
am trying to have XML data show results in a combobox (Which works) and when the combobox has a selection, change the text in a label field. I am following the video from...
0
by: preeti13 | last post by:
i have a two tables employeenominations and reason if someone storing a data first time it will store into the employeenominations table if name is already exist it will store into the reason table...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.