>
>
> Sure , here we go :
>>
>
> /bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
>> -I../gcc/libgomp  -I../gcc/libgomp/config/posix -I../gcc/libgomp  -Wall
>> -Werror -Wc,-pthread -g -O2 -pthread -MT alloc.lo -MD -MP -MF
>> .deps/alloc.Tpo -c -o alloc.lo ../gcc/libgomp/alloc.c
>> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../gcc/libgomp
>> -I../gcc/libgomp/config/posix -I../gcc/libgomp -Wall -pthread -Werror -g
>> -O2 -pthread -MT alloc.lo -MD -MP -MF .deps/alloc.Tpo -c
>> ../gcc/libgomp/alloc.c -o alloc.o
>>
>
> You can see it's using "gcc" to compile.  It should be using
> "x86_64-rumprun-netbsd-gcc".  I think it will be fixed with make distclean
> and re-running configure with the right params.


You were right and I could compile the OpenMp example file but noticed a
Warning by adding -Wall to the compiler argument list.

x86_64-rumprun-netbsd-gcc *-Wall* -pedantic  -I
/tmp/thesis_vs/gcc-build/omp_hello.c
-c

One line Version (Compile and Link):
x86_64-rumprun-netbsd-gcc omp_hello.c *-Wall* -I /tmp/thesis_vs/gcc-build/
-L /tmp/thesis_vs/gcc-build/.libs/libgomp.a -lpthread  -o omp_hello.bin

I get following Warning:

> omp_hello.c: In function ‘main’:
> omp_hello.c:22:0: warning: ignoring #pragma omp parallel
> [-Wunknown-pragmas]
>  #pragma omp parallel private(nthreads, tid)
>  ^
> omp_hello.c:38:1: warning: control reaches end of non-void function
> [-Wreturn-type]
>  }
>  ^


 Depending on if I compile the program as before (two steps) or in one line
I get two different error messages returned from Rumpbake:

When I compile the file with

x86_64-rumprun-netbsd-gcc -pedantic  -I /tmp/thesis_vs/gcc-build/
> omp_hello.c -c
> x86_64-rumprun-netbsd-gcc -pedantic omp_hello.o -lgomp -o omp_hello.bin
> /tmp/thesis_vs/gcc-build/.libs/libgomp.a -pthread


and execute rumpbake xen_pci omp_hello omp_hello.bin

I get following message:

> `.text.exit' referenced in section `.fini_array' of
> /tmp/rumprun-bake.18Re0Y/tmp1.obj: defined in discarded section
> `.text.exit' of /tmp/rumprun-bake.18Re0Y/tmp1.obj
>
> collect2: error: ld returned 1 exit status
>
>
When I bake the file compiled with the one line version from above I get:

> /tmp/rumprun-bake.GJSD6s/tmp1.obj: In function `rumpbake_main1':
> (.text+0x10): undefined reference to `omp_get_thread_num'
> /tmp/rumprun-bake.GJSD6s/tmp1.obj: In function `rumpbake_main1':
> (.text+0x32): undefined reference to `omp_get_num_threads'
> collect2: error: ld returned 1 exit status

Unfortunately I cant make sense of the error messages (especially the first
one), in the second one the linking didn't work for some strange reason.

Any hints highly appreciated. :)

Thanks!


-Vincent

Reply via email to