Help - library linking problems

Hi -

 I am new to Root, and trying to set it up on my Windows machine using Cygwin and gcc.  I have set the paths, and when I type the "root" command in my X-terminal it gives me the welcome-to-Root with the following error:

*** Interpreter error recovered ***
dlopen error: Permission denied
Load Error: Failed to load Dynamic link library /home/Emily/root/lib/libMinuit.dll
dlopen error: Permission denied
Load Error: Failed to load Dynamic link library /home/Emily/root/lib/libPostscript.dll
dlopen error: Permission denied
Load Error: Failed to load Dynamic link library /home/Emily/root/lib/libHtml.dll

I have checked that these three libraries exist, but cannot find any information on why I am getting a link error. Has anyone encountered this before, or have any suggestions? Thanks!
~ Emily

Hi Emily,

these files are probably not marked as executables (you can change that by running “chmod a+x %ROOTSYS/lib/*.dll”) or there is something else that’s wrong - maybe the links in $ROOTSYS/lib point to nowhere. Could you send the output of “ls -l $ROOTSYS/{lib,bin}; echo $ROOTSYS”? (All commands I stated here are to be issued in a bash window or xterm.)

Axel.

On windows the actual library are located in $ROOTSYS/bin and not in $ROOTSYS/lib. So do not add $ROOTSYS/lib on your path but do add $ROOTSYS/bin.

Cheers,
Philippe.

“ls -l $ROOTSYS/bin” gives a list of files; the important part seems to be:

-rwxrwxrwx 1 Emily None 775232 May 4 12:50 libHtml.dll
-rwxrwxrwx 1 Emily None 667804 May 4 08:34 libKrb5Auth.dll
-rwxrwxrwx 1 Emily None 778716 May 4 12:50 libMLP.dll
-rwxrwxrwx 1 Emily None 2675046 May 4 08:23 libMatrix.dll
-rwxrwxrwx 1 Emily None 586001 May 4 12:50 libMinuit.dll
-rwxrwxrwx 1 Emily None 31385 May 4 08:24 libNew.dll
-rwxrwxrwx 1 Emily None 144313 May 4 08:32 libPgSQL.dll
-rwxrwxrwx 1 Emily None 1001151 May 4 08:28 libPhysics.dll
-rwxrwxrwx 1 Emily None 781947 May 4 12:50 libPostscript.dll
-rwxrwxrwx 1 Emily None 2131620 May 4 12:51 libProof.dll

“ls -l $ROOTSYS/lib” gives again a list of files, including:

-rwxrwxrwx 1 Emily None 0 May 4 12:50 libHistPainter.dll
-rwxrwxrwx 1 Emily None 0 May 4 12:50 libHistPainter.dll.a
-rwxrwxrwx 1 Emily None 0 May 4 12:50 libHtml.dll
-rwxrwxrwx 1 Emily None 0 May 4 12:50 libHtml.dll.a
-rwxrwxrwx 1 Emily None 0 May 4 08:34 libKrb5Auth.dll
-rwxrwxrwx 1 Emily None 0 May 4 08:34 libKrb5Auth.dll.a
-rwxrwxrwx 1 Emily None 0 May 4 12:50 libMLP.dll
-rwxrwxrwx 1 Emily None 0 May 4 12:50 libMLP.dll.a
-rwxrwxrwx 1 Emily None 0 May 4 08:23 libMatrix.dll
-rwxrwxrwx 1 Emily None 0 May 4 08:23 libMatrix.dll.a
-rwxrwxrwx 1 Emily None 0 May 4 12:50 libMinuit.dll
-rwxrwxrwx 1 Emily None 0 May 4 12:50 libMinuit.dll.a
-rwxrwxrwx 1 Emily None 0 May 4 08:24 libNew.dll
-rwxrwxrwx 1 Emily None 0 May 4 08:24 libNew.dll.a
-rwxrwxrwx 1 Emily None 0 May 4 08:32 libPgSQL.dll
-rwxrwxrwx 1 Emily None 0 May 4 08:32 libPgSQL.dll.a
-rwxrwxrwx 1 Emily None 0 May 4 08:28 libPhysics.dll
-rwxrwxrwx 1 Emily None 0 May 4 08:28 libPhysics.dll.a
-rwxrwxrwx 1 Emily None 0 May 4 12:50 libPostscript.dll
-rwxrwxrwx 1 Emily None 0 May 4 12:50 libPostscript.dll.a
-rwxrwxrwx 1 Emily None 0 May 4 12:51 libProof.dll
-rwxrwxrwx 1 Emily None 0 May 4 12:51 libProof.dll.a

echo $ROOTSYS gives /home/Emily/root as expected.

I can’t tell that there’s any difference among the three libraries that won’t link and any of the other libraries…

     ~ Emily

On windows, at run-time, the file in $ROOTSYS/lib are irrevelant. Make sure that directory is not in your $PATH variable.

Philippe.

I’ve been setting PATH to $ROOTSYS/bin, and LD_LIBRARY_PATH to $ROOTSYS/lib.

Do not set this on windows.

Philippe.

Hi,

in principle Philippe is right - but the cygwin build is not really windows :slight_smile: It really looks in lib first. I can reproduce what Emily sees by “touch $ROOTSYS/lib/libMinuit.dll”.

Emily, you should have links in your $ROOTSYS/lib dir, instead of empty files. I don’t understand where they come from. Did you run out of disk space? What root, what windows, and what cygwin (“uname -a”) version are you using? Did you build root yourself ("./configure win32gcc; make"), or did you install a binary release?

Cheers, Axel.

Setting LD_LIBRARY_PATH to $ROOTSYS/bin gives me the same errors as before.

[quote=“EmilyRussell”]Hi -

*** Interpreter error recovered ***
dlopen error: Permission denied
~ Emily[/quote]

Which compiler did you use to compile your staff. Under VC++ there no “dlopen” subroutine.

Guys,
she did say “using cygwin and gcc”. Trust me, dlopen exists, and it’s coded such that it looks in $ROOTSYS/lib.

Emily, please give me the info I requested, so we can solve this.

Axel.

[quote=“Axel”]Guys,
she did say “using cygwin and gcc”.Axel.[/quote]

O :blush: sorry. Then, she does need the proper LD_LIBRARY_PATH.

I am running Windows XP Pro; Root version 4.04 for Windows with Cygwin and gcc; and Cygwin_NT-5.1 (at least that’s what “uname -a” in the bash shell gives). I downloaded the Root binaries and unpacked them into Cygwin’s home folder.

I’ve been experimenting a bit, and if I download the binaries for an older version of Root (4.02 and 4.00) then fewer of the *.dll files show up as empty. I’ve also tried unpacking to a different folder, but that doesn’t seem to change anything. I have plenty of drivespace, so I’m not sure what the issue is.

Hi Emily,

copy&paste the following into an xterm or bash window:

cd $ROOTSYS/lib for f in ../bin/*.dll; do ln -fs $f; ln -fs $f $(basename $f).a; done That should fix it. I’ll try to figure out why the links didn’t make it onto your disk…

Cheers, Axel.

Axel -

That seems to have worked - thanks so much for your help!!
~ Emily