[Gc] gcc-4.6 with gc-cvs = 'GC_CreateThread' was not declared in this scope

Dmitrijs Ledkovs dmitrij.ledkov at ubuntu.com
Thu Aug 12 14:44:11 PDT 2010


I'm working on getting gcc-4.6 to work with cvs boehm-gc.

I'm using build/host=linux-gnu and target=i686-w64-mingw32.

Most of the things in the port were semi-obvious:
(configury, GC_PTR -> void *, etc)

But now I'm stuck here:

libtool: compile:  /home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/gcc/./gcc/xgcc -shared-libgcc -B/home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/gcc/./gcc -nostdinc++ -L/home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/gcc/i686-w64-mingw32/libstdc++-v3/src -L/home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/gcc/i686-w64-mingw32/libstdc++-v3/src/.libs -L/home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr/i686-w64-mingw32/lib -L/home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr/mingw/lib -isystem /home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr/i686-w64-mingw32/include -isystem /home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr/mingw/include -B/home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr/i686-w64-mingw32/bin/ -B/home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr/i686-w64-mingw32/lib/ -isystem /home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr/i686-w64-mingw32/include -isystem /home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr/i686-w64-mingw32/sys-include -DHAVE_CONFIG_H -I. -I/home/tdlk/src/mingw-w64/superv32/gcc/libjava -I./include -I./gcj -I/home/tdlk/src/mingw-w64/superv32/gcc/libjava -Iinclude -I/home/tdlk/src/mingw-w64/superv32/gcc/libjava/include -I/home/tdlk/src/mingw-w64/superv32/gcc/libjava/classpath/include -Iclasspath/include -I/home/tdlk/src/mingw-w64/superv32/gcc/libjava/classpath/native/fdlibm -I/home/tdlk/src/mingw-w64/superv32/gcc/libjava/../boehm-gc/include -I../boehm-gc/include -I/home/tdlk/src/mingw-w64/superv32/gcc/libjava/libltdl -I/home/tdlk/src/mingw-w64/superv32/gcc/libjava/libltdl -I/home/tdlk/src/mingw-w64/superv32/gcc/libjava/.././libjava/../gcc -I/home/tdlk/src/mingw-w64/superv32/gcc/libjava/../zlib -I/home/tdlk/src/mingw-w64/superv32/gcc/libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -mthreads -fdollars-in-identifiers -Wswitch-enum -D_FILE_OFFSET_BITS=64 -ffloat-store -fomit-frame-pointer -Usun -fno-omit-frame-pointer -Wextra -Wall -D_GNU_SOURCE -DPREFIX=\"/home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr\" -DTOOLEXECLIBDIR=\"/home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr/lib/gcc/i686-w64-mingw32/4.6.0\" -DJAVA_HOME=\"/home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr\" -DBOOT_CLASS_PATH=\"/home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr/share/java/libgcj-4.6.0.jar\" -DJAVA_EXT_DIRS=\"/home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr/share/java/ext\" -DGCJ_ENDORSED_DIRS=\"/home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr/share/java/gcj-endorsed\" -DGCJ_VERSIONED_LIBDIR=\"/home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr/lib/../lib/gcj-4.6.0-12\" -DPATH_SEPARATOR=\":\" -DECJ_JAR_FILE=\"/usr/share/java/eclipse-ecj.jar\" -DLIBGCJ_DEFAULT_DATABASE=\"/home/tdlk/src/mingw-w64/superv32/i686-w64-mingw32/root/usr/lib/../lib/gcj-4.6.0-12/classmap.db\" -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL=\"gcj-4.6.0-12/classmap.db\" -g -O2 -DGC_NOT_DLL -Wl,--enable-runtime-pseudo-reloc,--no-undefined -MT win32-threads.lo -MD -MP -MF .deps/win32-threads.Tpo -c /home/tdlk/src/mingw-w64/superv32/gcc/libjava/win32-threads.cc -o win32-threads.o
/home/tdlk/src/mingw-w64/superv32/gcc/libjava/win32-threads.cc: In function 'void _Jv_ThreadStart(java::lang::Thread*, _Jv_Thread_t*, void (*)(java::lang::Thread*))':
/home/tdlk/src/mingw-w64/superv32/gcc/libjava/win32-threads.cc:393:69: error: 'GC_CreateThread' was not declared in this scope
make[4]: *** [win32-threads.lo] Error 1

The function in question is:

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
void
_Jv_ThreadStart (java::lang::Thread *thread, _Jv_Thread_t *data, _Jv_ThreadStartFunc *meth)
{
  DWORD id;
  struct starter *info;

  // Do nothing if thread has already started
  if (data->flags & FLAG_START)
    return;
  data->flags |= FLAG_START;

  info = (struct starter *) _Jv_AllocBytes (sizeof (struct starter));
  info->method = meth;
  info->data = data;

  if (! thread->isDaemon ())
    {
      WaitForSingleObject (daemon_mutex, INFINITE);
      non_daemon_count++;
      ReleaseMutex (daemon_mutex);
    }
  else
    data->flags |= FLAG_DAEMON;

  data->handle = GC_CreateThread(NULL, 0, really_start, info, 0, &id);
  _Jv_ThreadSetPriority(data, thread->getPriority());
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

I really cannot figure out what is causing "not declared in this scope"
error. How did GC_CreateThread changed since 6.6..... or are there
particular additiona precautions I should make when targeting mingw32?

Please help =)

Regards,
Dima.




More information about the Gc mailing list