Ik loop bij het builden van node.js aan tegen een vage error:
In ./build/config.log
Heb test.c opgezocht, staat in build/.conf_check_0
Als ik deze code door gcc haal dan krijg ik inderdaad de foutmelding (undefined reference to pthread_atfork) die hierboven staat.
Het bestand "pthread.h" staat netjes in include/
Google heeft niets opgeleverd:
1) Wordt gezegd dat je "gcc -lpthread" moet gebruiken, maar dat zou ./configure toch moeten afhandelen (?) en werkt trouwens ook niet
2) Als je via cygwin op windows C code gaat compilen, heb je pthread-w32 oid nodig, maar ik zit op linux
./configure ... Checking for library pthread : yes Checking for function pthread_create : yes Checking for function pthread_atfork : not found <-- hier gaat het fout ./node-v0.1.93/deps/libeio/wscript:13: error: the configuration failed (see './node-v0.1.93/build/config.log')
In ./build/config.log
code:
1
2
3
4
5
| ... In function `main': test.c:(.text+0xe): undefined reference to `pthread_atfork' test.c:(.text+0x12): undefined reference to `pthread_atfork' ... |
Heb test.c opgezocht, staat in build/.conf_check_0
code:
1
2
3
4
5
6
7
| #include <pthread.h> int main() { void *p; p=(void*)(pthread_atfork); return 0; } |
Als ik deze code door gcc haal dan krijg ik inderdaad de foutmelding (undefined reference to pthread_atfork) die hierboven staat.
Het bestand "pthread.h" staat netjes in include/
code:
1
2
3
4
5
| ... extern int pthread_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)) __THROW; ... |
Google heeft niets opgeleverd:
1) Wordt gezegd dat je "gcc -lpthread" moet gebruiken, maar dat zou ./configure toch moeten afhandelen (?) en werkt trouwens ook niet
2) Als je via cygwin op windows C code gaat compilen, heb je pthread-w32 oid nodig, maar ik zit op linux
uname -a Linux nas1 2.6.24 #1141 Sat Mar 13 00:50:14 CST 2010 ppc GNU/Linux gcc -v gcc driver version 3.4.6 executing gcc version 3.4.3 cat /proc/version Linux version 2.6.24 (root@image13) (gcc version 3.4.3 20041021 (prerelease)) #1141 Sat Mar 13 00:50:14 CST 2010