Hi, yes... me again, with another "random problem" :) I'm with a friend, Nicolas, trying to compile the latest unix vm. We cloned [hidden email]:cogvm/blessed.git We prepared a new image, using ConfigurationOfCog, version 1.3 We generate sources by executing: CMakeGenScripts generateCogSources. CMakeVMGenerator generate: CogUnixConfig. and we tried to compile the vm, using gcc 4.4.3 and we are getting the following error: usr/include/pthread.h:227: note: expected ‘void * (*)(void *)’ but argument is of type ‘void (*)(void *)’ make[2]: *** [CMakeFiles/Cog.dir/home/npasserini/Work/investigacion/mars/blessed/platforms/unix/vm/sqUnixHeartbeat.o] Error 1 make[1]: *** [CMakeFiles/Cog.dir/all] Error 2 make: *** [all] Error 2 Any idea? Igor? Thanks! Esteban |
On 2 March 2011 01:07, Esteban Lorenzano <[hidden email]> wrote: > > Hi, > yes... me again, with another "random problem" :) > I'm with a friend, Nicolas, trying to compile the latest unix vm. > We cloned [hidden email]:cogvm/blessed.git > We prepared a new image, using ConfigurationOfCog, version 1.3 > We generate sources by executing: > CMakeGenScripts generateCogSources. > CMakeVMGenerator generate: CogUnixConfig. > and we tried to compile the vm, using gcc 4.4.3 > and we are getting the following error: > usr/include/pthread.h:227: note: expected ‘void * (*)(void *)’ but argument is of type ‘void (*)(void *)’ > make[2]: *** [CMakeFiles/Cog.dir/home/npasserini/Work/investigacion/mars/blessed/platforms/unix/vm/sqUnixHeartbeat.o] Error 1 > make[1]: *** [CMakeFiles/Cog.dir/all] Error 2 > make: *** [all] Error 2 > Any idea? > Igor? This is strange. I don't think that it will change anything, but can you try using my clone: git clone --depth 1 git://gitorious.org/~abrabapupa/cogvm/sig-cog.git and to generate stuff you can use just: CogUnixConfig generateWithSources. i suspect there is something with pthread library. You either using some odd headers, or Cog code using private stuff, which not supposed to be used. I don't know. I will check if it works with blessed repo. During next week. Right now i busy preparing for school :) > Thanks! > Esteban > -- Best regards, Igor Stasenko AKA sig. |
Hi, can you fast check which gcc version are you using? (maybe it is something with this) we are using gcc 4.4.3. El 02/03/2011, a las 6:26a.m., Igor Stasenko escribió: > This is strange. > I don't think that it will change anything, but can you try using my clone: > > git clone --depth 1 git://gitorious.org/~abrabapupa/cogvm/sig-cog.git checked... same result :) > > and to generate stuff you can use just: > > CogUnixConfig generateWithSources. not checked, but this is just a cool way to avoid steps :) > I will check if it works with blessed repo. During next week. Right > now i busy preparing for school :) good luck, I want videos! :) best, Esteban |
On 2 March 2011 10:35, Esteban Lorenzano <[hidden email]> wrote: > > Hi, > can you fast check which gcc version are you using? (maybe it is something with this) we are using gcc 4.4.3. > gcc -v Using built-in specs. Target: i686-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu Thread model: posix gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) > El 02/03/2011, a las 6:26a.m., Igor Stasenko escribió: > >> This is strange. >> I don't think that it will change anything, but can you try using my clone: >> >> git clone --depth 1 git://gitorious.org/~abrabapupa/cogvm/sig-cog.git > > checked... same result :) > Okay, i found the issue. It is in Cog sources: Here the part from pthread.h header: extern int pthread_create (pthread_t *__restrict __newthread, __const pthread_attr_t *__restrict __attr, >>> void *(*__start_routine) (void *), void *__restrict __arg) __THROW __nonnull ((1, 3)); so, it barks on start_routine formal parameter type, which differs from what used in sqUnixHeartBeat.c. There are two uses of it: pthread_create(&tickerThread, (const pthread_attr_t *)0, tickerSleepCycle, 0))) if ((er= pthread_create(&careLess, (const pthread_attr_t *)0, beatStateMachine, 0))) { static void tickerSleepCycle(void *ignored) static void * beatStateMachine(void *careLess) So, as you can see, the fix is extremely simple --- s/void/void*/ in tickerSleepCycle declaration to match with function type which pthread_create expects. It is strange why my compiler don't barks on it :) >> >> and to generate stuff you can use just: >> >> CogUnixConfig generateWithSources. > > not checked, but this is just a cool way to avoid steps :) > Yes. The generic way to do things is to invoke: <Config> generate or <Config> generateWithSources and only if you need to customize a config, like build with different plugin set, or using different directories layout, you then do: | config | config := <Config> new. config platformsDir: (FileDirectory on:'/mydir/platforms'). config buildDir: (FileDirectory on:'/otherDir/build'). config internalPlugins: (config internalPlugins copyWith: #MyPlugin). config generateSourceFiles. CMakeVMMaker new generate: config. >> I will check if it works with blessed repo. During next week. Right >> now i busy preparing for school :) > > good luck, I want videos! :) > > best, > Esteban > -- Best regards, Igor Stasenko AKA sig. |
thanks! El 02/03/2011, a las 7:34a.m., Igor Stasenko escribió: > > On 2 March 2011 10:35, Esteban Lorenzano <[hidden email]> wrote: >> >> Hi, >> can you fast check which gcc version are you using? (maybe it is something with this) we are using gcc 4.4.3. >> > > gcc -v > Using built-in specs. > Target: i686-linux-gnu > Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro > 4.4.4-14ubuntu5' > --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs > --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr > --program-suffix=-4.4 --enable-shared --enable-multiarch > --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib > --without-included-gettext --enable-threads=posix > --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib > --enable-nls --with-sysroot=/ --enable-clocale=gnu > --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all > --disable-werror --with-arch-32=i686 --with-tune=generic > --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu > --target=i686-linux-gnu > Thread model: posix > gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) > > >> El 02/03/2011, a las 6:26a.m., Igor Stasenko escribió: >> >>> This is strange. >>> I don't think that it will change anything, but can you try using my clone: >>> >>> git clone --depth 1 git://gitorious.org/~abrabapupa/cogvm/sig-cog.git >> >> checked... same result :) >> > Okay, i found the issue. It is in Cog sources: > > Here the part from pthread.h header: > > extern int pthread_create (pthread_t *__restrict __newthread, > __const pthread_attr_t *__restrict __attr, >>>> void *(*__start_routine) (void *), > void *__restrict __arg) __THROW __nonnull ((1, 3)); > > > so, it barks on start_routine formal parameter type, which differs > from what used in sqUnixHeartBeat.c. There are two uses of it: > > pthread_create(&tickerThread, > (const pthread_attr_t *)0, > tickerSleepCycle, > 0))) > > if ((er= pthread_create(&careLess, > (const pthread_attr_t *)0, > beatStateMachine, > 0))) { > > > static void tickerSleepCycle(void *ignored) > static void * beatStateMachine(void *careLess) > > So, as you can see, the fix is extremely simple --- s/void/void*/ in > tickerSleepCycle declaration to match with function type which > pthread_create expects. > > It is strange why my compiler don't barks on it :) > > > >>> >>> and to generate stuff you can use just: >>> >>> CogUnixConfig generateWithSources. >> >> not checked, but this is just a cool way to avoid steps :) >> > > Yes. The generic way to do things is to invoke: > > <Config> generate > or > <Config> generateWithSources > > and only if you need to customize a config, like build with different > plugin set, or using different directories layout, you then do: > > | config | > config := <Config> new. > config platformsDir: (FileDirectory on:'/mydir/platforms'). > config buildDir: (FileDirectory on:'/otherDir/build'). > > config internalPlugins: (config internalPlugins copyWith: #MyPlugin). > config generateSourceFiles. > CMakeVMMaker new generate: config. > >>> I will check if it works with blessed repo. During next week. Right >>> now i busy preparing for school :) >> >> good luck, I want videos! :) >> >> best, >> Esteban >> > > > > -- > Best regards, > Igor Stasenko AKA sig. |
Free forum by Nabble | Edit this page |