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

Support compilation with C89 #25

Open
Totktonada opened this issue Jun 2, 2020 · 4 comments
Open

Support compilation with C89 #25

Totktonada opened this issue Jun 2, 2020 · 4 comments
Assignees
Milestone

Comments

@Totktonada
Copy link
Member

As far as I got this change, the idea was to use parent's project CFLAGS when libsmall is built as part of another project (and so when CMake variable SMALL_EMBEDDED is set). So we should be quite tolerable to different options and C dialects.

GCC 4.8 comforms to C89 by default (with GNU extensions, as if -std=gnu90 would be passed). GCC 4.8 is the default compiler on Ubuntu Trusty that is the previous default OS on Travis CI (until it was changed to Xenial).

All those facts comes into one fail when we tried to update libsmall in tarantool/memcached module.

Please, ensure that C89 support will not break again with a CI rule.

Thanks @LeonidVas for the initial investigation.

@Totktonada Totktonada added the bug Something isn't working label Jun 2, 2020
@LeonidVas LeonidVas self-assigned this Jun 3, 2020
@LeonidVas
Copy link
Contributor

Maybe it's time is come to say that c89 is deprecated?

@LeonidVas
Copy link
Contributor

I think that if we still want to use c89, then this should be added to the "small" ci.

@tsafin
Copy link

tsafin commented Jun 3, 2020

I'd rather burn Trusty and we would move forward.

FWIW, Yandex.Taxi used Trusty on most of their datacenter host till circa year ago, and then gradually upgraded everything to Xenial. Trusty is unsupported target for half a year already.

@Totktonada
Copy link
Member Author

Maybe it's time is come to say that c89 is deprecated?

Okay, but then we should get rid (fully or partially) from the idea to be built with parent's flags. At least from using parent's C dialect. It is the change of the expected behaviour (that was never documented though).

Totktonada pushed a commit to tarantool/memcached that referenced this issue Jun 3, 2020
If SMALL_EMBEDDED is used, "small" will try to compile
with the default flags, but it can't be compiled with std=c89.
Look like a "small" library bug.
So, we will use std=c99 globally as workaround.

See tarantool/small#25

Part of #59

@Totktonada: added the comment.
Totktonada pushed a commit to tarantool/memcached that referenced this issue Jun 3, 2020
If SMALL_EMBEDDED is used, "small" will try to compile
with the default flags, but it can't be compiled with std=c89.
Look like a "small" library bug.
So, we will use std=c99 globally as workaround.

See tarantool/small#25

Part of #59

@Totktonada: added the comment.
@Totktonada Totktonada added the good first issue Good for newcomers label Aug 18, 2020
@Totktonada Totktonada added backlog build prio5 teamE and removed bug Something isn't working labels Dec 21, 2020
@kyukhin kyukhin added this to the wishlist milestone Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants