xmonad/X11

Problem linking OS X Mountion Lion

Closed this issue · 9 comments

I have installed X11 and also this library without any problems.

When im trying to test my app i get this error

Loading package X11-1.6.0 ... can't load .so/.DLL for: Xext (dlopen(libXext.dylib, 9): image not found)

I have made a symlink to /usr because it installs X11 by default in /opt.

Hm. It's possible you don't have some of the extension libraries installed. Can you check what locate libXext says? If it doesn't return any hits, maybe you need to install some more (non-Haskell) things.

The result of execution locate libXext is this:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/X11/lib/libXext.6.4.0.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/X11/lib/libXext.6.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/X11/lib/libXext.dylib
/opt/X11/lib/libXext.6.dylib
/opt/X11/lib/libXext.dylib
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/x11/xorg-libXext
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/x11/xorg-libXext/Portfile

i hope this helps.

Thanks!

Martín

On Sep 20, 2012, at 12:38 AM, Daniel Wagner notifications@github.com wrote:

Hm. It's possible you don't have some of the extension libraries installed. Can you check what locate libXext says? If it doesn't return any hits, maybe you need to install some more (non-Haskell) things.


Reply to this email directly or view it on GitHub.

Can you try running your program with this command line?

DYLD_LIBRARY_PATH=/opt/X11/lib:$DYLD_LIBRARY_PATH /path/to/haskellx11program

If that works, then perhaps you can figure out how to set up your linker correctly so that it knows about /opt/X11/lib.

I have set the DYLD_LIBRARY_PATH to the correct one, i don't get what i have to do with the location of my program.

Thanks

Martín

On Sep 20, 2012, at 1:01 AM, Daniel Wagner notifications@github.com wrote:

Can you try running your program with this command line?

DYLD_LIBRARY_PATH=/opt/X11/lib:$DYLD_LIBRARY_PATH /path/to/haskellx11program
If that works, then perhaps you can figure out how to set up your linker correctly so that it knows about /opt/X11/lib.


Reply to this email directly or view it on GitHub.

This fixed the problem "export DYLD_LIBRARY_PATH=/opt/X11/lib:$DYLD_LIBRARY_PATH" but after closing the terminal the issue persist. I suppose that this value that's set to the path variable remains only in that particular session. How can i set it permanently?

Thanks

Martín

On Sep 20, 2012, at 1:13 AM, Martin Fernandez fmartin91@gmail.com wrote:

I have set the DYLD_LIBRARY_PATH to the correct one, i don't get what i have to do with the location of my program.

Thanks

Martín

On Sep 20, 2012, at 1:01 AM, Daniel Wagner notifications@github.com wrote:

Can you try running your program with this command line?

DYLD_LIBRARY_PATH=/opt/X11/lib:$DYLD_LIBRARY_PATH /path/to/haskellx11program
If that works, then perhaps you can figure out how to set up your linker correctly so that it knows about /opt/X11/lib.


Reply to this email directly or view it on GitHub.

If setting that environment variable fixes things, then you should man dyld to learn how to configure dyld properly. Setting DYLD_LIBRARY_PATH is just a workaround.

Figure it out!

Thanks a lot for the help!

Martín

On 20/09/2012, at 01:45, Daniel Wagner notifications@github.com wrote:

If setting that environment variable fixes things, then you should man
dyldto learn how to configure dyld properly. Setting
DYLD_LIBRARY_PATH is just a workaround.


Reply to this email directly or view it on
GitHubhttps://github.com//issues/14#issuecomment-8716723.

I am having issues again while executing my program. I leave the crash with the complete information.

Process: ghc [22082]
Path: /Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.3/ghc
Identifier: ghc
Version: ???
Code Type: X86 (Native)
Parent Process: bash [22079]
User ID: 501

Date/Time: 2012-09-24 20:40:07.781 -0300
OS Version: Mac OS X 10.8.2 (12C54)
Report Version: 10

Crashed Thread: 2

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000005

VM Regions Near 0x5:
--> __PAGEZERO 0000000000000000-0000000000001000 [ 4K] ---/--- SM=NUL /Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.3/ghc
__TEXT 0000000000001000-0000000001046000 [ 16.3M] r-x/rwx SM=COW /Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.3/ghc

Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x947378e2 __psynch_cvwait + 10
1 libsystem_c.dylib 0x94889220 _pthread_cond_wait + 833
2 libsystem_c.dylib 0x9490f0a1 pthread_cond_wait$UNIX2003 + 71
3 ghc 0x00f94737 waitCondition + 23

Thread 1:
0 libsystem_kernel.dylib 0x94737c02 __select_nocancel + 10
1 libsystem_kernel.dylib 0x9473667f select + 92
2 ghc 0x00ed7fa0 s7AZ_info + 100

Thread 2 Crashed:
0 libX11.6.dylib 0x0561cef6 XCreateWindow + 126
1 ??? 0x0572a559 0 + 91399513

Thread 3:
0 libsystem_kernel.dylib 0x947378e2 __psynch_cvwait + 10
1 libsystem_c.dylib 0x94889220 _pthread_cond_wait + 833
2 libsystem_c.dylib 0x9490f0a1 pthread_cond_wait$UNIX2003 + 71
3 ghc 0x00f94737 waitCondition + 23

Thread 2 crashed with X86 Thread State (32-bit):
eax: 0x00000001 ebx: 0x06067600 ecx: 0x00000008 edx: 0x0000eff5
edi: 0x06066c00 esi: 0x0606ee00 ebp: 0xb0100e98 esp: 0xb0100e70
ss: 0x00000023 efl: 0x00010202 eip: 0x0561cef6 cs: 0x0000001b
ds: 0x00000023 es: 0x00000023 fs: 0x00000023 gs: 0x0000000f
cr2: 0x00000005
Logical CPU: 6

Binary Images:
0x1000 - 0x1045feb +ghc (???) <93D70A30-4E31-D0B8-61B2-F8477445F02C> /Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.3/ghc
0x3299000 - 0x32a1ffc +libXext.dylib (11) <126ADA41-FAF3-3FF3-AD10-8421779B1F2F> /opt/X11//libXext.dylib
0x32a9000 - 0x32b7fff +libxcb.1.dylib (3) <7C831413-F0A6-3828-8415-8C0598E38FA1> /opt/X11/
/libxcb.1.dylib
0x32c8000 - 0x32c9fff +libXau.6.dylib (7) <0F730BA2-44B7-3560-AAA9-4FC35618B4C5> /opt/X11//libXau.6.dylib
0x32ce000 - 0x32d0fff +libXdmcp.6.dylib (7) <263D68D1-A183-33D7-A2E5-C28F6E9B2865> /opt/X11/
/libXdmcp.6.dylib
0x32ef000 - 0x32f3fff +libXrandr.dylib (5) <277E09B3-FF12-3841-9614-65FED61F6917> /opt/X11//libXrandr.dylib
0x32f9000 - 0x32f9ffe +libXinerama.dylib (2) /opt/X11/
/libXinerama.dylib
0x4e0d000 - 0x4e12fff +libXrender.1.dylib (5) <0F290D15-4EB2-32ED-9245-7E7CB6FF52BA> /opt/X11//libXrender.1.dylib
0x5600000 - 0x56eaffb +libX11.6.dylib (10) <9F38ABEF-5080-3B98-A610-7B4B7CE6315D> /opt/X11/
/libX11.6.dylib
0x8fe55000 - 0x8fe87e57 dyld (210.2.3) <23516BE4-29BE-350C-91C9-F36E7999F0F1> /usr/lib/dyld
0x90007000 - 0x9000aff7 libcompiler_rt.dylib (30) /usr/lib/system/libcompiler_rt.dylib
0x9005c000 - 0x9005dffd libunc.dylib (25) <58599CBF-E262-3CEA-AFE1-35560E0177DC> /usr/lib/system/libunc.dylib
0x90ec1000 - 0x90ec8ffb libunwind.dylib (35.1) /usr/lib/system/libunwind.dylib
0x90fec000 - 0x90fedfff libquarantine.dylib (52) /usr/lib/system/libquarantine.dylib
0x911ac000 - 0x911acfff libkeymgr.dylib (25) /usr/lib/system/libkeymgr.dylib
0x912d9000 - 0x912e7ff3 libsystem_network.dylib (77.10) <7FBF5A15-97BA-3721-943E-E77F0C40DBE1> /usr/lib/system/libsystem_network.dylib
0x912e8000 - 0x912f0fff libcopyfile.dylib (89) <4963541B-0254-371B-B29A-B6806888949B> /usr/lib/system/libcopyfile.dylib
0x919d0000 - 0x919dafff libsystem_notify.dylib (98.5) <7EEE9475-18F8-3099-B0ED-23A3E528ABE0> /usr/lib/system/libsystem_notify.dylib
0x93bc0000 - 0x93bc0fff libSystem.B.dylib (169.3) <81C58EAB-0E76-3EAB-BDFD-C5A6FE95536F> /usr/lib/libSystem.B.dylib
0x94723000 - 0x9473dffc libsystem_kernel.dylib (2050.18.24) /usr/lib/system/libsystem_kernel.dylib
0x9486e000 - 0x9492bfeb libsystem_c.dylib (825.25) /usr/lib/system/libsystem_c.dylib
0x94993000 - 0x949a5ff7 libdispatch.dylib (228.23) <86EF7D45-2D97-3465-A449-95038AE5DABA> /usr/lib/system/libdispatch.dylib
0x94b69000 - 0x94b74fff libcommonCrypto.dylib (60026) /usr/lib/system/libcommonCrypto.dylib
0x94b75000 - 0x94ba1ff7 libsystem_info.dylib (406.17) /usr/lib/system/libsystem_info.dylib
0x94d7e000 - 0x94d9bfff libxpc.dylib (140.41) <1BFE3149-C242-3A77-9729-B00DEDC8CCF2> /usr/lib/system/libxpc.dylib
0x94da9000 - 0x94db0fff liblaunch.dylib (442.26.2) <310C99F8-0811-314D-9BB9-D0ED6DFA024B> /usr/lib/system/liblaunch.dylib
0x95771000 - 0x95778fff libsystem_dnssd.dylib (379.32.1) <6A505284-2382-3F27-B96F-15FFDACF004E> /usr/lib/system/libsystem_dnssd.dylib
0x95798000 - 0x957c8fff libncurses.5.4.dylib (37.3) <30D8B67F-5447-34AB-900F-2D623CD4F117> /usr/lib/libncurses.5.4.dylib
0x96931000 - 0x96935ff7 libmacho.dylib (829) <5280A013-4F74-3F74-BE0C-7F612C49F1DC> /usr/lib/system/libmacho.dylib
0x96dcb000 - 0x96df8ffe libsystem_m.dylib (3022.6) <9975D9C3-3B71-38E3-AA21-C5C5F9D9C431> /usr/lib/system/libsystem_m.dylib
0x97638000 - 0x9763afff libdyld.dylib (210.2.3) <05D6FF2A-F09B-309D-95F7-7AF10259C707> /usr/lib/system/libdyld.dylib
0x97959000 - 0x9795afff libsystem_sandbox.dylib (220) <4E42390B-25EC-3530-AF01-337E430C16EB> /usr/lib/system/libsystem_sandbox.dylib
0x9795b000 - 0x97a4cffc libiconv.2.dylib (34) /usr/lib/libiconv.2.dylib
0x987d8000 - 0x987d8fff libsystem_blocks.dylib (59) <3A743C5D-CFA5-37D8-80A8-B6795A9DB04F> /usr/lib/system/libsystem_blocks.dylib
0x998b9000 - 0x998bafff libremovefile.dylib (23.1) <98622D14-DAAB-3AD8-A5D9-C322BF572A98> /usr/lib/system/libremovefile.dylib
0x99f33000 - 0x99f37ffe libcache.dylib (57) <834FDCA7-FE3B-33CC-A12A-E11E202477EC> /usr/lib/system/libcache.dylib
0x99f56000 - 0x99fa2fff libcorecrypto.dylib (106.2) <20EBADBA-D6D6-36F0-AE80-168E9AF13DB6> /usr/lib/system/libcorecrypto.dylib
0x9a672000 - 0x9a673fff libdnsinfo.dylib (453.18) <41C7B8E2-2A81-31DE-BD8B-F0C29E169D4F> /usr/lib/system/libdnsinfo.dylib

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 1379
thread_create: 5
thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=68.3M resident=40.1M(59%) swapped_out_or_unallocated=28.2M(41%)
Writable regions: Total=62.9M written=13.9M(22%) resident=15.1M(24%) swapped_out=0K(0%) unallocated=47.9M(76%)

REGION TYPE VIRTUAL
=========== =======
MALLOC 37.2M
MALLOC guard page 32K
Memory tag=35 8020K
Stack 65.5M
VM_ALLOCATE 16.0M
__DATA 1500K
__IMPORT 4K
__LINKEDIT 47.5M
__PAGEZERO 4K
__TEXT 20.8M
mapped file 183.7M
shared memory 12K
=========== =======
TOTAL 380.1M

I'm a busy person, and these bindings have very low priority in my life right now. Moreover, I strongly suspect that the bug is in your code, not in the bindings.

Given these two facts, you have to give some pretty convincing evidence that the problem lies specifically in the haskell-pkg-janitors/X11 codebase (like "here's a patch that fixes the problem for me" or like "this minimal Haskell program has the problem and this straightforward C translation does not") before I plan on paying attention.

Good luck.