eugmes / fntsample

PDF and PostScript font samples generator (migrating from https://sourceforge.net/projects/fntsample/)
GNU General Public License v3.0
23 stars 4 forks source link

Travis-ci: build is failing on AMD64 #14

Closed sanjaymsh closed 4 years ago

sanjaymsh commented 4 years ago

Hi,

I am trying to enable ppc64le build on travis. But while testing, its failing on AMD64 itself only with below error:

" /home/travis/build/sanjaymsh/fntsample/src/fntsample.c:47:32: error: initializer element is not constant static const double A4_WIDTH = 8.3 POINTS_PER_INCH; ^~~ /home/travis/build/sanjaymsh/fntsample/src/fntsample.c:48:33: error: initializer element is not constant static const double A4_HEIGHT = 11.7 POINTS_PER_INCH; ^~~~ /home/travis/build/sanjaymsh/fntsample/src/fntsample.c:50:35: error: initializer element is not constant static const double xmin_border = POINTS_PER_INCH / 1.5; ^~~~~~~ /home/travis/build/sanjaymsh/fntsample/src/fntsample.c:51:35: error: initializer element is not constant static const double ymin_border = POINTS_PER_INCH; ^~~~~~~ /home/travis/build/sanjaymsh/fntsample/src/fntsample.c:52:34: error: initializer element is not constant static const double cell_width = (A4_WIDTH - 2 xmin_border) / 16; ^ /home/travis/build/sanjaymsh/fntsample/src/fntsample.c:53:35: error: initializer element is not constant static const double cell_height = (A4_HEIGHT - 2 ymin_border) / 16; ^ src/CMakeFiles/fntsample.dir/build.make:67: recipe for target 'src/CMakeFiles/fntsample.dir/fntsample.c.o' failed make[2]: [src/CMakeFiles/fntsample.dir/fntsample.c.o] Error 1 CMakeFiles/Makefile2:155: recipe for target 'src/CMakeFiles/fntsample.dir/all' failed make[1]: [src/CMakeFiles/fntsample.dir/all] Error 2 Makefile:151: recipe for target 'all' failed make: ** [all] Error 2 The command "make package" exited with 2. 0.00s$ tar tzf fntsample-.tar.gz tar (child): fntsample-.tar.gz: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now The command "tar tzf fntsample-.tar.gz" exited with 2. Done. Your build exited with 1. "

The full error can be tracked here: https://travis-ci.com/github/sanjaymsh/fntsample/builds/189670049

Please have a look on this.

Thanks !!

eugmes commented 4 years ago

It looks like POINTS_PER_INCH has to be made a #define. The compiler has stopped accepting result of multiplication of a const variable as a constant expressions for some reason.