Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1370686171.39088.YahooMailNeo@web120904.mail.ne1.yahoo.com>
Date: Sat, 8 Jun 2013 03:09:31 -0700 (PDT)
From: NeonFlash <psykosonik_frequenz@...oo.com>
To: "john-users@...ts.openwall.com" <john-users@...ts.openwall.com>
Subject: Unable to compile JtR with OpenCL on Ubuntu 12.04

Hi,

I have previously successfully installed JtR 1.7.9 jumbo version with OpenCL support on OpenSUSE.

It worked properly.

Now, I am trying to install it on Ubuntu 12.04 x64 version. I have the ATI propreitary drivers installed and they are working. Other GPGPU applications are able to interact with it and work.

Please find the details below.

location of libOpenCL.so and *cl.h*

locate OpenCL

/usr/lib/libOpenCL.so.1
/usr/lib/i386-linux-gnu/libOpenCL.so.1

locate *cl.h*

/home/Neon/GPU Bruteforcers/JtR/john-1.7.9-jumbo-7/src/common-opencl.h

echo $ATISTREAMSDKROOT

/usr/lib

Note: I did not find any includes directory in the path of OpenCL.

Now, I compile JtR as follows:

make linux-x86-opencl

The error comes here:


gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement 
-I/usr/local/include     -I/usr/local/cuda/include -DHAVE_CRYPT 
-DCL_VERSION_1_0 -DHAVE_DL -DUSING_ICC_S_FILE -funroll-loops rar_fmt.c


In file included from rar_fmt.c:88:0:
common-opencl.h:8:19: fatal error: CL/cl.h: No such file or directory
compilation terminated.

I checked the code of rar_fmt.c (line 88) and it has:


cat -n rar_fmt.c | more

    85    #include "johnswap.h"
    86    #include "unrar.h"
    87    #ifdef CL_VERSION_1_0
    88    #include "common-opencl.h" <--- unable to locate this header file.

common-opencl.h header file is present in the source directory of JtR itself (current directory from where I am compiling)

in common-opencl.h at line 8, I noticed that it is trying to include the header file, CL/cl.h and is unable to locate it.

cat -n common-opencl.h | more

     8    #include <CL/cl.h>
     9    #include <CL/cl_ext.h>

I also noticed that while compiling, it is using the includes directory as /usr/local/cude/include in the CCFLAGS passed to gcc.

even though I have the environment variable, ATISTREAMSDKROOT, it is using the path of cuda.

I checked the Makefile and the following section is used to set the value of OCLROOT

ifdef NVIDIA_CUDA
OCLROOT = $(NVIDIA_CUDA)
else
OCLROOT = /usr/local/cuda
endif
ifdef AMDAPPSDKROOT
AMDAPP = -DAMDAPPSDK
OCLROOT = $(AMDAPPSDKROOT)
endif
ifdef ATISTREAMSDKROOT
AMDAPP = -DAMDAPPSDK
OCLROOT = $(ATISTREAMSDKROOT)
endif
ifdef HAVE_NSS
NSS_LDFLAGS = `pkg-config --libs nss`
endif

I do not have the NVIDIA_CUDA environment variable set. Only ATISTREAMSDKROOT environment variable is set.

I have tried resetting the environment variables, followed by make clean and then again tried compiling, but it keeps using the includes directory corresponding to CUDA (/usr/local/include/cuda)

Also, I am not sure if I am setting the value of ATISTREAMSDKROOT environment varible correctly. In my case, I found libOpenCL.so in /usr/lib and /usr/lib/i386-linux-gnu/. I have tried setting the environment variable to both of these values, but it does not work in both the cases.

Please let me know if more details are required to troubleshoot.

Thanks.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.