On Wed, 18 Mar 2015 17:19:45 GMT, Lucas Hereld wrote:
A few weeks ago when i updated my gentoo system, I couldn't build my projects anymore. I have tried all sorts of things and am out of ideas. Any help would be appreciated.
This is a gentoo running kernel version 3.18.7-gentoo, gcc 4.8.3, binutils 2.24-r3
This is the output from dub:
$ dub
Target vibe-d 0.7.22 is up to date. Use --force to rebuild.
Target mysql-native 0.1.1 is up to date. Use --force to rebuild.
Building dtest ~master configuration "application", build type debug.
Running gdc...
../../.dub/packages/vibe-d-0.7.22/libvibe-d.a: In function_D4vibe4core7drivers9libevent215Libevent2Driver6__ctorMFC4vibe4core6driver10DriverCoreZC4vibe4core7drivers9libevent215Libevent2Driver':<br>/home/******/projects/newproj/../../.dub/packages/vibe-d-0.7.22/source/vibe/core/drivers/libevent2.d:91: undefined reference to
eventsetmemfunctions'
collect2: error: ld returned 1 exit status
FAIL .dub/build/application-debug-linux.posix-x8664-gdc_2065-76B3E0488DD269990492210F17969A8A/ dtest executable
Error executing command run: gdc failed with exit code 1.I have tried a new project with the same result, and done a --force and also deleting everything in ~/.dub/. I have also tried using ldc2 and dmd.
Since it complains only about event_set_mem_functions
, it looks related to an incompatible version of libevent. Support for that function seems to be optional (there is a EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED
macro in the C headers to detect that). Maybe the Gentoo version has that disabled by default? I'm not sure when it was introduced, but it might also be an old <2.0.x version that doesn't yet have this.
As a workaround you could try to use the latest version of vibe.d (0.7.23-rc.2) and add "subConfigurations": {"vibe-d": "libasync"}
to your dub.json. That will remove the libevent dependency completely, at the expense of using a less tested backend (runs pretty well, though).