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

libunwind 1.2.1 UNW_VERSION_MINOR is not an integer #30

Closed
orivej opened this issue Jul 3, 2017 · 4 comments
Closed

libunwind 1.2.1 UNW_VERSION_MINOR is not an integer #30

orivej opened this issue Jul 3, 2017 · 4 comments

Comments

@orivej
Copy link

orivej commented Jul 3, 2017

Configuring libunwind 1.2.1 after autoreconf generates this in include/libunwind-common.h:

#define UNW_VERSION_MAJOR	1
#define UNW_VERSION_MINOR	2.1
#define UNW_VERSION_EXTRA	

Since UNW_VERSION_MINOR is not an integer, it is not comparable in macros.

This happens because configure.ac contains

define(pkg_major, 1)
define(pkg_minor, 2.1)
define(pkg_extra, )

This breaks compilation of julia 0.5.1:

src/julia_internal.h:496:35: error: floating constant in preprocessor expression
        (UNW_VERSION_MAJOR == 1 && UNW_VERSION_MINOR > 1))
                                   ^

Discovered in NixOS/nixpkgs#26891 (comment)

@djwatson
Copy link
Member

djwatson commented Jul 5, 2017

Sure can change UNW_VERSION_EXTRA to contain the 1 instead, thanks

@orivej
Copy link
Author

orivej commented Jul 5, 2017

Looking at mkvers

define(mkvers, $1.$2$3)
dnl Process this file with autoconf to produce a configure script.
AC_INIT([libunwind],[mkvers(pkg_major, pkg_minor, pkg_extra)],[pkg_maintainer])

it might be better to set pkg_extra to .1 so that concatenated version becomes 1.2.1. (Maybe .1 might be omitted at all, as it was in 1.0.1?)
Nethertheless 1.2.1 is already tagged, so I hope for this issue not to reoccur in 1.2.2 and future releases.

@djwatson
Copy link
Member

djwatson commented Jul 5, 2017

Sure, thanks, will make sure this is correct for the next release.

@djwatson djwatson closed this as completed Jul 5, 2017
@orivej
Copy link
Author

orivej commented Jul 5, 2017

Thank you!

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