Skip to content
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

Can it work cross different GCC version? #26

Open
quocnhat opened this issue Jul 20, 2020 · 2 comments
Open

Can it work cross different GCC version? #26

quocnhat opened this issue Jul 20, 2020 · 2 comments

Comments

@quocnhat
Copy link

quocnhat commented Jul 20, 2020

Hello @wheybags
You said that You have built binary libs on DEBIAN 9 (GLIBC 2.24) and run on UBUNTU 12.04( GLIB 2.14) successfully. I know that the GCC version is different on those two systems. Do you have any tricks or something? Because I fail on building libs on Ubuntu 18.04 and expect to run on CentOS7 due to GCC version. Thank you

@saierd
Copy link

saierd commented Jul 20, 2020

The headers in this repository only affect the glibc symbols. You probably still have problems with libgcc and libstdc++ (if using C++), which get linked dynamically by default. Both of them can be linked statically by using the flags -static-libgcc and/or -static-libstdc++.

Note that when using C++ the default libstdc++ from a newer system might have dependencies on later versions of the glibc, as it is mentioned in the readme. This is a hard problem to circumvent, as it requires to build your own version of libstdc++. See #20 for further discussion.

@quocnhat
Copy link
Author

quocnhat commented Jul 20, 2020

Thank you for your response.
I've tried #20 . I choose to use the first solution ( rebuild project on old Ubuntu 18.04 gcc version 4.9.3, CentOS 7 uses gcc 4.8.5, it seems compatible together) and gcc errors gone (no error std:__cxx11...).
But still exist some errors due to glibc (after compilling with this magic header file glibc2.17):
undefined reference to _ZGVdN8vv_powf@GLIBC_2.22' undefined reference to _ZGVcN4v_exp@GLIBC_2.22'
undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'
I 've spent for weeks for this bug but did not help. Please give some advice, many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants