Opened 12 years ago

Closed 12 years ago

#35103 closed defect (invalid)

R: Cannot call X11() function

Reported by: chutsu@… Owned by: kjellpk (Kjell Konis)
Priority: Normal Milestone:
Component: ports Version: 2.1.1
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: R

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I obtained the following error when attempting to use X11()

> X11()
Error in X11() : X11 module cannot be loaded
In addition: Warning message:
In X11() :
  unable to load shared object '/opt/local/lib/R/modules/x86_64/R_X11.so':
  dlopen(/opt/local/lib/R/modules/x86_64/R_X11.so, 6): Symbol not found: _iconv
  Referenced from: /usr/lib/libcups.2.dylib
  Expected in: /opt/local/lib/libiconv.2.dylib
 in /usr/lib/libcups.2.dylib

Change History (10)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Description: modified (diff)
Owner: changed from macports-tickets@… to kjell.konis@…
Priority: HighNormal
Summary: Cannot call X11() function in RR: Cannot call X11() function

Why would /usr/lib/libcups.2.dylib (or anything in /usr/lib) reference /opt/local/lib/libiconv.2.dylib (or anything in /opt/local/lib)? This might happen if you set LD_LIBRARY_PATH or DYLD_LIBRARY_PATH to include /opt/local/lib, or if you actually replaced Apple's /usr/lib/libcups.2.dylib with one built by MacPorts. If you've done either of those things, you should undo them.

comment:2 Changed 12 years ago by chutsu@…

"if you set LD_LIBRARY_PATH or DYLD_LIBRARY_PATH to include /opt/local/lib ....you should undo them"

That doesn't make sense though, its should be ok to load DYLD_LIBRARY_PATH to /opt/local/lib, else how do I define those libs when I need them?

comment:3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Setting LD_LIBRARY_PATH or DYLD_LIBRARY_PATH will cause problems like this; please do not set them. Why do you wish to set them? If anything, set only DYLD_FALLBACK_LIBRARY_PATH, but even that should not be necessary except in strange circumstances.

comment:4 Changed 12 years ago by chutsu@…

I set the DYLD_LIBRARY_PATH so that when I compile programs the compiler knows where to look for the libraries, isn't that what its for?

comment:5 Changed 12 years ago by neverpanic (Clemens Lang)

The compiler doesn't use DYLD_LIBRARY_PATH, the loader does. Ideally you wouldn't have to set DYLD_LIBRARY_PATH, because the binary you're trying to run knows where it's dependent libraries are.

Does R not work without setting DYLD_LIBRARY_PATH? Why are you setting DYLD_LIBRARY_PATH?

comment:6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Instead, set LIBRARY_PATH to /opt/local/lib and/or add -L/opt/local/lib to LDFLAGS.

comment:7 in reply to:  5 ; Changed 12 years ago by chutsu@…

Replying to cal@…:

The compiler doesn't use DYLD_LIBRARY_PATH, the loader does. Ideally you wouldn't have to set DYLD_LIBRARY_PATH, because the binary you're trying to run knows where it's dependent libraries are.

Ok, perhaps I misunderstood.

Does R not work without setting DYLD_LIBRARY_PATH? Why are you setting DYLD_LIBRARY_PATH?

R does work without setting DYLD_LIBRARY_PATH. Thanks

comment:8 in reply to:  7 ; Changed 12 years ago by neverpanic (Clemens Lang)

Replying to chutsu@…:

R does work without setting DYLD_LIBRARY_PATH. Thanks

Do you consider this problem to be solved? Should I close this ticket?

comment:9 in reply to:  8 Changed 12 years ago by chutsu@…

Replying to cal@…:

Replying to chutsu@…:

R does work without setting DYLD_LIBRARY_PATH. Thanks

Do you consider this problem to be solved? Should I close this ticket?

Yes, thank you very much for the help :)

comment:10 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.