littlorryatchina / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

linkage problem in link_settings #284

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In libjpeg_turbo of third_party, I am trying to include OpenCL's header and 
link with OpenCL's shared object(libOpenCL.so). 
2. In libjpeg.gyp, I touched include_dirs part, inserting path of OpenCL. I 
agree -I wii be attached in front of path, and compiled. Also I specified 
cflags.
3. I wrote link_settings(ldflags & libraries). After gyp_chromium for making 
libjpeg.target.mk and build (by make -j4 chrome). I tried to find which .so is 
created. I ran ldd by 'ldd chrome', it shows libOpenCL.so and libcuda.so. It 
looks like build is complete and link is finished. But when I ran chrome, this 
OpenCL API did not work well. I think this is linkage problem.

What is the expected output? What do you see instead?
Compilation was succeed, also link has finished. But when I run chrome shared 
object in /build/Debug,
one function of OpenCL's doesn't work at all. This function, clGetPlatformIDs 
which is 1st API for preparing GPU platform just return invalid value(-1001, It 
should return 0 as successful). It could be GPU's problem, but I ran this 
OpenCL's code independantly, only OpenCL worked very well. So I think there's a 
problem in gyp.

What version of the product are you using? On what operating system?
I'm using Chromium OS and operating system is Ubuntu Linux 11.04 natty

Please provide any additional information below.
I attach libjpeg.gyp. Please look this and give any suggestion for making 
perfect gyp.
I don't know correct dependency between third_party and external 
library(OpenCL). Also I'm studying gyp's grammar and structure. I'm not good at 
writing gyp paragraph yet. 

Original issue reported on code.google.com by macs...@gmail.com on 13 Jul 2012 at 4:41

Attachments: