Bug 3923 - version.h:38:47: error: invalid suffix "f89" on floating constant
Summary: version.h:38:47: error: invalid suffix "f89" on floating constant
Status: RESOLVED INVALID
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Other (show other bugs)
Version: 3.16.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2017-11-21 22:04 UTC by Traumschule Riebau
Modified: 2017-11-23 03:44 UTC (History)
0 users

See Also:


Attachments
config.h (13.08 KB, text/x-chdr)
2017-11-22 11:04 UTC, Traumschule Riebau
no flags Details
version.h (1.51 KB, text/x-chdr)
2017-11-22 11:05 UTC, Traumschule Riebau
no flags Details
config.log.gz (34.55 KB, application/gzip)
2017-11-22 11:25 UTC, Traumschule Riebau
no flags Details

Description Traumschule Riebau 2017-11-21 22:04:00 UTC
Compiling claws-mail on Debian stretch from source:
$ git clone http://git.claws-mail.org/readonly/claws.git
$ cd claws
$ sudo apt-get install bison flex libetpan-dev -
$ ./autogen.sh && ./configure && make
...
version.h:38:47: error: invalid suffix "f89" on floating constant                                                                                                         
 #define VERSION_NUMERIC  MAKE_NUMERIC_VERSION(8e9f89, 8e9f89, \
                                               ^
version.h:25:54: note: in definition of macro ‘MAKE_NUMERIC_VERSION’
 #define MAKE_NUMERIC_VERSION(a, b, c, d) ((((guint32)a) << 24) | (((guint32)b) << 16) | \
                                                      ^                         
claws.c:143:9: note: in expansion of macro ‘VERSION_NUMERIC’                
  return VERSION_NUMERIC;
         ^~~~~~~~~~~~~~~
version.h:38:55: error: invalid suffix "f89" on floating constant         
 #define VERSION_NUMERIC  MAKE_NUMERIC_VERSION(8e9f89, 8e9f89, \
                                                       ^
version.h:25:77: note: in definition of macro ‘MAKE_NUMERIC_VERSION’
 #define MAKE_NUMERIC_VERSION(a, b, c, d) ((((guint32)a) << 24) | (((guint32)b) << 16) | \
                                                                             ^
claws.c:143:9: note: in expansion of macro ‘VERSION_NUMERIC’
  return VERSION_NUMERIC;
         ^~~~~~~~~~~~~~~
version.h:39:12: error: invalid suffix "f89" on floating constant
            8e9f89, 0)
            ^
version.h:26:19: note: in definition of macro ‘MAKE_NUMERIC_VERSION’
        (((guint32)c) <<  8) |  ((guint32)d)      )
                   ^
claws.c:143:9: note: in expansion of macro ‘VERSION_NUMERIC’
  return VERSION_NUMERIC;
         ^~~~~~~~~~~~~~~
claws.c:144:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
Comment 1 Andrej Kacian 2017-11-22 08:38:32 UTC
That is really odd, some of the lines from version.h from that output look wrong. Can you please attach config.log file, as well as the version.h file (it is in src/common subdirectory)?
Comment 2 Traumschule Riebau 2017-11-22 11:04:51 UTC
Created attachment 1816 [details]
config.h
Comment 3 Traumschule Riebau 2017-11-22 11:05:32 UTC
Created attachment 1817 [details]
version.h
Comment 4 Paul 2017-11-22 11:14:10 UTC
can you attach the file config.log (from the top-level build dir)?
Comment 5 Traumschule Riebau 2017-11-22 11:25:55 UTC
Created attachment 1818 [details]
config.log.gz
Comment 6 Andrej Kacian 2017-11-22 11:36:20 UTC
The issue is that you are getting incorrect "git describe" output - "8e9f89-dirty". I'm not sure how that is even possible, especially the -dirty suffix, which is a nonsense if you are working from a fresh, clean git clone.

Can you post output of these commands when inside the cloned "claws" directory?

git --version
git describe
git describe --abbrev=6 --dirty --always
Comment 7 Traumschule Riebau 2017-11-22 11:38:45 UTC
$ git --version
git version 2.11.0
$ git describe
fatal: No names found, cannot describe anything.
$ git describe --abbrev=6 --dirty --always
8e9f89-dirty
Comment 8 Traumschule Riebau 2017-11-22 11:47:38 UTC
To save download size I used the git parameter --depth 1, i guess this is what confuses the scripts. Sorry for not mentioning it earlier, I thought it is harmless.
Comment 9 Andrej Kacian 2017-11-22 11:51:30 UTC
Yep, that seems to be part of it - "git describe" works off tags in the repository, and with --depth=1, you won't get any tags in your clone (unless the most recent commit is tagged, I guess).

What is still unexplained is the -dirty suffix. You must have modified some file after cloning and before running autogen.sh.
Comment 10 Traumschule Riebau 2017-11-22 12:46:05 UTC
I checked out the repository out again with
 - depth=50
 - without depth option
and saw the exact same behavior. So it has to be something else.

What might be the actual reason is that I tar-ed the archive and transferred the archive to my local computer, extracted it and run above steps.

Building claws on the remote computer (x86_64, xenial) directly worked without problem. So surprisingly (to me) archiving and extracting the folder does have an effect on building claws. Do you have an idea why this is?
Comment 11 Andrej Kacian 2017-11-22 14:07:33 UTC
(In reply to comment #10)
> I checked out the repository out again with
>  - depth=50
>  - without depth option
> and saw the exact same behavior. So it has to be something else.

Last tag has been done 175 commits ago, so --depth=50 won't help. Without --depth, you get full history with all tags, and that will make git describe work correctly, unless you have some weird .gitconfig options set to omit fetching tags, or something like that.

ticho@penny:~/wrk$ git clone http://git.claws-mail.org/readonly/claws.git
Cloning into 'claws'...
remote: Counting objects: 104070, done.
remote: Compressing objects: 100% (20427/20427), done.
remote: Total 104070 (delta 89338), reused 96744 (delta 83489)
Receiving objects: 100% (104070/104070), 46.54 MiB | 3.96 MiB/s, done.
Resolving deltas: 100% (89338/89338), done.
ticho@penny:~/wrk$ cd claws
ticho@penny:~/wrk/claws(master)$ git describe --abbrev=6 --dirty --always
3.15.0-175-g8e9f89
ticho@penny:~/wrk/claws(master)$ git describe
3.15.0-175-g8e9f89bef
ticho@penny:~/wrk/claws(master)$
Comment 12 Traumschule Riebau 2017-11-23 03:44:26 UTC
Thanks for the explanation. I just built Claws Mail 3.15.0git175.

Note You need to log in before you can comment on or make changes to this bug.