Hi,

Pulling main into the program cause some error during compiling the gcc
libgomp (OpenMP) library. When I try to compile the Make created by the
configure file.

*Output:*

x86_64-rumprun-netbsd-gcc -DHAVE_CONFIG_H -I. -I/tmp/gcc/libgomp
>  -I/tmp/gcc/libgomp/config/posix -I/tmp/gcc/libgomp  -Wall -Werror
>  -pthread -g -O2 -pthread -E -P -include config.h - > libgomp.ver || (rm -f
> libgomp.ver ; exit 1)
> /bin/sh ./libtool --tag CC   --mode=link x86_64-rumprun-netbsd-gcc -Wall
> -Werror -Wc,-pthread -g -O2 -pthread   -Wl,-O1   -o libgomp.la -version-info
> 1:0:0 -Wl,--version-script,libgomp.ver  -rpath /usr/local/lib/ alloc.lo
> barrier.lo critical.lo env.lo error.lo iter.lo iter_ull.lo loop.lo
> loop_ull.lo ordered.lo parallel.lo sections.lo single.lo task.lo team.lo
> work.lo lock.lo mutex.lo proc.lo sem.lo bar.lo ptrlock.lo time.lo
> fortran.lo affinity.lo target.lo
>


> libtool: link: x86_64-rumprun-netbsd-gcc -shared  .libs/alloc.o
> .libs/barrier.o .libs/critical.o .libs/env.o .libs/error.o .libs/iter.o
> .libs/iter_ull.o .libs/loop.o .libs/loop_ull.o .libs/ordered.o
> .libs/parallel.o .libs/sections.o .libs/single.o .libs/task.o .libs/team.o
> .libs/work.o .libs/lock.o .libs/mutex.o .libs/proc.o .libs/sem.o
> .libs/bar.o .libs/ptrlock.o .libs/time.o .libs/fortran.o .libs/affinity.o
> .libs/target.o    -pthread -pthread -Wl,-O1 -Wl,--version-script
> -Wl,libgomp.ver   -pthread -Wl,-soname -Wl,libgomp.so.1 -o
> .libs/libgomp.so.1.0
>


> /tmp/rumprun/platform/pseudolinkstubs.o: In function `_want_main':
> /tmp/rumprun/platform/pseudolinkstubs.c:6: undefined reference to `main'
>


> collect2: error: ld returned 1 exit status
> make[2]: *** [libgomp.la] Error 1
> make[2]: Leaving directory `/tmp/gcc-build'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/tmp/gcc-build'
> make: *** [all] Error 2
>
>
>
*Issue: *

   - I think this issue is related to the fix of Rumprun Github Issue #27
   https://github.com/rumpkernel/rumprun/issues/27
   - I got the same error when I just call the GCC Wrapper
   x86_64-rumprun-netbsd-gcc

/tmp/rumprun/platform/pseudolinkstubs.o: In function `_want_main':
>
>> /tmp/rumprun/platform/pseudolinkstubs.c:6: undefined reference to `main'
> collect2: error: ld returned 1 exit status




*My attempt to fix:*

   - I reverted the fix that was applied for issue #27 and I could compile
   the program without a hitch.


*Question:*

   - What was the original intend / reasoning for patch #27 ? Since just
   reverting #27 is just a temporary workaround.



- Vincent

Reply via email to