1 |
On 19-07-2007 00:59:44 -0600, Aaron Wilson wrote: |
2 |
> I'm trying to compile some C code that uses OpenMP. I've compiled gcc-4.2.0 |
3 |
> with the openmp USE flag |
4 |
> in OS X 10.4.10. I've selected it with gcc-config (and re-sourced |
5 |
> ~/Library/Gentoo/etc/profile) |
6 |
> |
7 |
>> $ gcc-config -l |
8 |
>> [1] i686-apple-darwin8-4.0.1 |
9 |
>> [2] i686-apple-darwin8-4.2.0 * |
10 |
> |
11 |
> But when I try to run code compiled with |
12 |
> |
13 |
> CFLAGS=-O3 -ansi -march=prescott -Wall -DNOSHORTS -DUSEGETTIME -DUSEOPENMP |
14 |
> -fopenmp -I../include |
15 |
> LDFLAGS=-L../lib -lsdp -framework Accelerate -lgomp -lm |
16 |
> |
17 |
> I get an error about not being able to load the library |
18 |
> |
19 |
>> $ make |
20 |
>> ... |
21 |
>> $ cd test; make |
22 |
>> ../solver/csdp theta1.dat-s >theta1.out |
23 |
>> dyld: Library not loaded: |
24 |
>> /Users/wilson/Library/Gentoo/usr/lib/libgomp.1.dylib |
25 |
>> Referenced from: /Users/wilson/Documents/Work/csdp/test/../solver/csdp |
26 |
>> Reason: image not found |
27 |
>> make: *** [theta1.out] Error 133 |
28 |
> |
29 |
> The library it's looking for is in the correct place, just not where my |
30 |
> code is looking. |
31 |
|
32 |
Ok. So the file /Users/wilson/Library/Gentoo/usr/lib/libgomp.1.dylib |
33 |
does not exist. |
34 |
|
35 |
>> $ locate libgomp.1.dylib |
36 |
>> /Users/wilson/Library/Gentoo/usr/lib/gcc/i686-apple-darwin8/4.2.0/libgomp.1.dylib |
37 |
>> $ gcc-config -L |
38 |
>> /Users/wilson/Library/Gentoo/usr/lib/gcc/i686-apple-darwin8/4.2.0 |
39 |
> |
40 |
> Thanks, |
41 |
> Aaron |
42 |
|
43 |
Right, I think gcc-config doesn't copy that lib to the place gcc is |
44 |
looking for it. I'm affraid the lib is installed in |
45 |
/Users/wilson/Library/Gentoo/lib/libgomp.1.dylib ... |
46 |
Can you verify that. I have to ponder a bit about this. |
47 |
|
48 |
> I'm new to C programming and hope that this isn't just my fault. I tried |
49 |
> setting LD_LIBRARY_PATH with no effect. |
50 |
|
51 |
I don't think this is your fault. We just never tested this. |
52 |
|
53 |
-- |
54 |
Fabian Groffen |
55 |
Gentoo on a different level |
56 |
-- |
57 |
gentoo-alt@g.o mailing list |