Re: [capi-sig] Linking problem

On 24.02.2013 15:18, ecir hana wrote:
On Sun, Feb 24, 2013 at 3:10 PM, M.-A. Lemburg <mal@egenix.com> wrote:
You can try to use dylibs
for your application, but chances are high that your users will run into problems picking up a dylib from one of the many sources for this file
I thought that if I include the dynamic library into the application bundle it should pick the version I provide..?
That's how it works on Windows, but not on a typical Unix system.
I don't know how Mac OS X works if you put the dylib into the application bundle - AFAIK, the bundle is just a directory, i.e. not special when it comes to linking, but I could be wrong.
"gcc -lname" will look for a file libname.a or libname.dylib. Please see the man page for details.
That's exactly the problem, The folder has "libpython33.dylib" file but when I do "gcc -lname libpython33" it says "i686-apple-darwin11-llvm-gcc-4.2: libpython33: No such file or directory".
Try a dtruss of the operation to check what gcc is looking for and where.
-- Marc-Andre Lemburg eGenix.com
Professional Python Services directly from the Source (#1, Feb 24 2013)
Python Projects, Consulting and Support ... http://www.egenix.com/ mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/

On Sun, Feb 24, 2013 at 3:43 PM, M.-A. Lemburg <mal@egenix.com> wrote:
On 24.02.2013 15:18, ecir hana wrote:
Try a dtruss of the operation to check what gcc is looking for and where.
You mean "sudo dtruss gcc -lname python33"? Do you mind if I post the result here, as I don't really understand what it is doing?
i686-apple-darwin11-llvm-gcc-4.2: python33: No such file or directory SYSCALL(args) = return open("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x0, 0x0) = 3 0 pread(0x3, "\312\376\272\276\0", 0x1000, 0x0) = 4096 0 pread(0x3, "\317\372\355\376\a\0", 0x1000, 0x6000) = 4096 0 mmap(0x105E39000, 0x2000, 0x5, 0x12, 0x3, 0x6000) = 0x5E39000 0 mmap(0x105E3B000, 0x1000, 0x3, 0x12, 0x3, 0x8000) = 0x5E3B000 0 mmap(0x105E3C000, 0x1FF0, 0x1, 0x12, 0x3, 0x9000) = 0x5E3C000 0 close(0x3) = 0 0 stat64("/usr/lib/libSystem.B.dylib\0", 0x7FFF59DD85D0, 0x7FFF59DD94D0) = 0 0 stat64("/usr/lib/system/libcache.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libcommonCrypto.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libcompiler_rt.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0 = 0 0 stat64("/usr/lib/system/libcopyfile.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libdispatch.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libdnsinfo.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libdyld.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libkeymgr.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/liblaunch.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libmacho.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libquarantine.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libremovefile.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libsystem_blocks.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libsystem_c.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libsystem_dnssd.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libsystem_info.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0 = 0 0 stat64("/usr/lib/system/libsystem_kernel.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libsystem_m.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libsystem_network.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libsystem_notify.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libsystem_sandbox.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libunc.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libunwind.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libxpc.dylib\0", 0x7FFF59DD82C0, 0x7FFF59DD91C0) = 0 0 stat64("/usr/lib/system/libcorecrypto.dylib\0", 0x7FFF59DD81C0, 0x7FFF59DD90C0) = 0 0 stat64("/usr/lib/libobjc.A.dylib\0", 0x7FFF59DD81A0, 0x7FFF59DD90A0) = 0 0 stat64("/usr/lib/libauto.dylib\0", 0x7FFF59DD81A0, 0x7FFF59DD90A0) = 0 0 stat64("/usr/lib/libc++abi.dylib\0", 0x7FFF59DD8070, 0x7FFF59DD8F70) = 0 0 stat64("/usr/lib/libc++.1.dylib\0", 0x7FFF59DD8070, 0x7FFF59DD8F70) = 0 0 getpid(0x7FFF59DD9528, 0x105E35004, 0xEA60) = 48241 0 __sysctl(0x7FFF59DD90E4, 0x2, 0x7FFF59DD90D0) = 0 0 bsdthread_register(0x7FFF904FD174, 0x7FFF904FD164, 0x2000) = 0 0 thread_selfid(0x7FFF904FD174, 0x7FFF904FD164, 0x0) = 1116174 0 mmap(0x0, 0x2000, 0x3, 0x1002, 0x1000000, 0x0) = 0x5E36000 0 mprotect(0x105E36000, 0x88, 0x1) = 0 0 mmap(0x0, 0x17000, 0x3, 0x1002, 0x1000000, 0x0) = 0x5E3E000 0 mprotect(0x105E3E000, 0x1000, 0x0) = 0 0 mprotect(0x105E54000, 0x1000, 0x0) = 0 0 mmap(0x0, 0x17000, 0x3, 0x1002, 0x1000000, 0x0) = 0x5E55000 0 mprotect(0x105E55000, 0x1000, 0x0) = 0 0 mprotect(0x105E6B000, 0x1000, 0x0) = 0 0 mmap(0x0, 0x1000, 0x3, 0x1002, 0x1000000, 0x0) = 0x5E38000 0 mprotect(0x105E38000, 0x1000, 0x1) = 0 0 mprotect(0x105E36000, 0x88, 0x3) = 0 0 mmap(0x7FDA98400000, 0x200000, 0x3, 0x1002, 0x7000000, 0x0) = 0x98400000 0 munmap(0x7FDA98500000, 0x100000) = 0 0 mprotect(0x105E36000, 0x88, 0x1) = 0 0 issetugid(0x7FFF858F7075, 0x7FFF59DD90E4, 0x7FFF59DD9CE0) = 0 0 mmap(0x7FDA98400000, 0x1000000, 0x3, 0x1002, 0x2000000, 0x0) = 0x98500000 0 munmap(0x7FDA98500000, 0x300000) = 0 0 munmap(0x7FDA99000000, 0x500000) = 0 0 wait4(0xBC72, 0x7FDA98403C40, 0x0) = 48242 0 issetugid(0x105E26000, 0x3, 0x7FFF59DD9C00) = 0 0 geteuid(0x105E26000, 0x3, 0x0) = 0 0 csops(0x0, 0x0, 0x7FFF59DD9754) = 0 0 shared_region_check_np(0x7FFF59DD76A8, 0x2, 0x7FFF59DD76A8) = 0 0 stat64("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x7FFF59DD87F0, 0x7FFF59DD97C0 = 0 0 getpid(0x7FFF59DD8F44, 0x3, 0x3) = 48241 0 __mac_syscall(0x7FFF8E5B98CC, 0x2, 0x7FFF59DD8F78) = 0 0 stat64("/AppleInternal\0", 0x7FFF59DD8FE8, 0x0) = -1 Err#2 audit_session_self(0x7FFF59DD8ED0, 0x7FFF59DD8D08, 0x4) = 4611 0 geteuid(0x7FFF59DD8ED0, 0x7FFF59DD8D08, 0x0) = 0 0 getegid(0x7FFF59DD8ED0, 0x7FFF59DD8D08, 0x0) = 0 0 getaudit_addr(0x7FFF59DD8F80, 0x30, 0x0) = 0 0 csops(0xBC71, 0x7, 0x7FFF59DD8B60) = 0 0 open("/dev/dtracehelper\0", 0x2, 0x7FFF59DD9620) = 3 0 ioctl(0x3, 0x80086804, 0x7FFF59DD9580) = 0 0 close(0x3) = 0 0 stat64("/usr/lib/libstdc++.6.dylib\0", 0x7FFF59DD85C0, 0x7FFF59DD94C0) = 0 0 access("/usr/bin/gcc\0", 0x1, 0x0) = 0 0 stat64("/usr/bin/gcc\0", 0x7FFF59DD88F0, 0x0) = 0 0 readlink("/usr/bin/gcc\0", 0x7FFF59DD937F, 0x400) = 12 0 readlink("/usr/bin/llvm-gcc-4.2\0", 0x7FFF59DD937F, 0x400) = 32 0 readlink("/usr/bin/../llvm-gcc-4.2/bin/llvm-gcc-4.2\0", 0x7FFF59DD937F, 0x400) = -1 Err#22 vfork() = 48242 0
participants (2)
-
ecir hana
-
M.-A. Lemburg