-
-
Notifications
You must be signed in to change notification settings - Fork 548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Centos编译报错 #342
Comments
Hi. Old compilers aren't well supported. It should be possible to build without this built-in, but there are probably other places where the code relies on things that aren't supported in old compilers.
Feel free to send a patch, though! I don't have the time to support Lwan on platforms, or with compilers that I don't use, but if someone fixes this, then I'll merge their patch just fine.
…On Thu, Apr 28, 2022, at 9:25 PM, fishfly123 wrote:
lwan-request.c:(.text+0xe79): undefined reference to `__builtin_expect_with_probability' lwan-request.c:(.text+0x12ad): undefined reference to `__builtin_expect_with_probability'
lwan-request.c:(.text+0x1485): undefined reference to `__builtin_expect_with_probability' lwan-request.c:(.text+0x19b8): undefined reference to `__builtin_expect_with_probability'
lwan-request.c:(.text+0x1b7a): undefined reference to `__builtin_expect_with_probability' ../../lib/liblwan.a(lwan-request.c.o):lwan-request.c:(.text+0x1d79): more undefined references to `__builtin_expect_with_probability' follow
collect2: error: ld returned 1 exit status
make[2]: *** [src/bin/lwan/lwan] Error 1
make[1]: *** [src/bin/lwan/CMakeFiles/lwan.dir/all] Error 2
make: *** [all] Error 2
—
Reply to this email directly, view it on GitHub <#342>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAADVGKX5PQAGRLA3ZALEY3VHNJDZANCNFSM5UUOX6AA>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
非常感谢您的回复,我可以使用哪个版本的GCC进行正确编译呢? |
You could try as below:
I was able to build with steps above in centos 7.9 |
lwan-request.c:(.text+0xe79): undefined reference to
__builtin_expect_with_probability' lwan-request.c:(.text+0x12ad): undefined reference to
__builtin_expect_with_probability'lwan-request.c:(.text+0x1485): undefined reference to
__builtin_expect_with_probability' lwan-request.c:(.text+0x19b8): undefined reference to
__builtin_expect_with_probability'lwan-request.c:(.text+0x1b7a): undefined reference to
__builtin_expect_with_probability' ../../lib/liblwan.a(lwan-request.c.o):lwan-request.c:(.text+0x1d79): more undefined references to
__builtin_expect_with_probability' followcollect2: error: ld returned 1 exit status
make[2]: *** [src/bin/lwan/lwan] Error 1
make[1]: *** [src/bin/lwan/CMakeFiles/lwan.dir/all] Error 2
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: