1

I'm trying to install fbpy, a simple Python library that allows drawing on the framebuffer. While installing, I get a bunch of warnings and one error about the cross compiler. What am I missing here? I've checked GCC and G++ and they're both in /usr/bin. The error:

Warning: Extension name 'fblib' does not match fully qualified name 'fbpy.utils.fblib' of './fbpy/utils/fblib.pyx'
running install
running build
running build_py
running build_ext
building 'fblib' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-9xgeTe/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c ./fbpy/utils/fblib.c -o build/temp.linux-armv7l-2.7/./fbpy/utils/fblib.o
In file included from /usr/include/python2.7/numpy/ndarraytypes.h:1788:0,
                 from /usr/include/python2.7/numpy/ndarrayobject.h:18,
                 from /usr/include/python2.7/numpy/arrayobject.h:4,
                 from ./fbpy/utils/fblib.c:422:
/usr/include/python2.7/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^~~~~~~
In file included from ./fbpy/utils/fblib.c:424:0:
./fbpy/utils/test.h:10:1: warning: useless storage class specifier in empty declaration
 };
 ^
In file included from ./fbpy/utils/fblib.c:425:0:
./fbpy/utils/audio.h:36:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int mainz();
 ^~~
In file included from ./fbpy/utils/fblib.c:426:0:
./fbpy/utils/fbutils.h:9:1: warning: useless storage class specifier in empty declaration
 };
 ^
./fbpy/utils/fbutils.h:17:1: warning: useless storage class specifier in empty declaration
 };
 ^
./fbpy/utils/fbutils.h:28:1: warning: useless storage class specifier in empty declaration
 };
 ^
./fbpy/utils/fbutils.h:43:1: warning: useless storage class specifier in empty declaration
 };
 ^
./fbpy/utils/fbutils.h:57:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int keepcurrent();
 ^~~~~~
./fbpy/utils/fbutils.h:59:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int cleartmpbuffer();
 ^~~~~~
./fbpy/utils/fbutils.h:60:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int clearscreen();
 ^~~~~~
./fbpy/utils/fbutils.h:64:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int kernel();
 ^~~~~~
./fbpy/utils/fbutils.h:70:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int snow();
 ^~~~~~
./fbpy/utils/fbutils.h:95:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int getHeight();
 ^~~~~~
./fbpy/utils/fbutils.h:96:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int getWidth();
 ^~~~~~
./fbpy/utils/fbutils.h:97:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int styledredraw();
 ^~~~~~
./fbpy/utils/fblib.c: In function ‘__pyx_pf_4fbpy_5utils_5fblib_78fbjackoff’:
./fbpy/utils/fblib.c:6176:3: warning: implicit declaration of function ‘kwit’ [-Wimplicit-function-declaration]
   kwit();
   ^~~~
./fbpy/utils/fblib.c: In function ‘__pyx_pf_4fbpy_5utils_5fblib_80fbgetnframes’:
./fbpy/utils/fblib.c:6244:36: warning: implicit declaration of function ‘getnframes’ [-Wimplicit-function-declaration]
   __pyx_t_1 = __Pyx_PyInt_From_int(getnframes()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error)
                                    ^~~~~~~~~~
./fbpy/utils/fblib.c: In function ‘__pyx_pf_4fbpy_5utils_5fblib_82fbreadjack’:
./fbpy/utils/fblib.c:6376:3: warning: implicit declaration of function ‘readout’ [-Wimplicit-function-declaration]
   readout(((double *)__pyx_v_audioL->data), ((double *)__pyx_v_audioR->data));
   ^~~~~~~
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-9xgeTe/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c ./fbpy/utils/fbutils.c -o build/temp.linux-armv7l-2.7/./fbpy/utils/fbutils.o
In file included from ./fbpy/utils/fbutils.c:34:0:
./fbpy/utils/test.h:10:1: warning: useless storage class specifier in empty declaration
 };
 ^
In file included from ./fbpy/utils/fbutils.c:35:0:
./fbpy/utils/audio.h:36:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int mainz();
 ^~~
In file included from ./fbpy/utils/fbutils.c:36:0:
./fbpy/utils/fbutils.h:9:1: warning: useless storage class specifier in empty declaration
 };
 ^
./fbpy/utils/fbutils.h:17:1: warning: useless storage class specifier in empty declaration
 };
 ^
./fbpy/utils/fbutils.h:28:1: warning: useless storage class specifier in empty declaration
 };
 ^
./fbpy/utils/fbutils.h:43:1: warning: useless storage class specifier in empty declaration
 };
 ^
./fbpy/utils/fbutils.h:57:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int keepcurrent();
 ^~~~~~
./fbpy/utils/fbutils.h:59:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int cleartmpbuffer();
 ^~~~~~
./fbpy/utils/fbutils.h:60:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int clearscreen();
 ^~~~~~
./fbpy/utils/fbutils.h:64:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int kernel();
 ^~~~~~
./fbpy/utils/fbutils.h:70:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int snow();
 ^~~~~~
./fbpy/utils/fbutils.h:95:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int getHeight();
 ^~~~~~
./fbpy/utils/fbutils.h:96:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int getWidth();
 ^~~~~~
./fbpy/utils/fbutils.h:97:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 extern int styledredraw();
 ^~~~~~
./fbpy/utils/fbutils.c:217:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int keepcurrent()
     ^~~~~~~~~~~
./fbpy/utils/fbutils.c:319:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int checkbounds()
     ^~~~~~~~~~~
./fbpy/utils/fbutils.c:355:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int cleartmpbuffer()
     ^~~~~~~~~~~~~~
./fbpy/utils/fbutils.c:361:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int clearscreen()
     ^~~~~~~~~~~
./fbpy/utils/fbutils.c:392:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int kernel()
     ^~~~~~
./fbpy/utils/fbutils.c: In function ‘plotalpha_’:
./fbpy/utils/fbutils.c:411:18: warning: unused variable ‘a’ [-Wunused-variable]
     float r,g,b, a;
                  ^
./fbpy/utils/fbutils.c: At top level:
./fbpy/utils/fbutils.c:556:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int snow()
     ^~~~
./fbpy/utils/fbutils.c: In function ‘snow’:
./fbpy/utils/fbutils.c:566:5: warning: implicit declaration of function ‘tvsnow’ [-Wimplicit-function-declaration]
     tvsnow();
     ^~~~~~
./fbpy/utils/fbutils.c: At top level:
./fbpy/utils/fbutils.c:587:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int tvsnow()
     ^~~~~~
./fbpy/utils/fbutils.c:691:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int styledredraw()
     ^~~~~~~~~~~~
./fbpy/utils/fbutils.c: In function ‘styledredraw’:
./fbpy/utils/fbutils.c:726:17: warning: implicit declaration of function ‘transform’ [-Wimplicit-function-declaration]
                 transform(&xr, &yr);
                 ^~~~~~~~~
./fbpy/utils/fbutils.c: In function ‘rotate’:
./fbpy/utils/fbutils.c:801:12: warning: type defaults to ‘int’ in declaration of ‘R’ [-Wimplicit-int]
     static R[27]={4,8,7,5,0,1,2,3,6,
            ^
./fbpy/utils/fbutils.c: In function ‘printxy’:
./fbpy/utils/fbutils.c:1186:18: warning: unused variable ‘backgrnd’ [-Wunused-variable]
     struct Color backgrnd;
                  ^~~~~~~~
./fbpy/utils/fbutils.c: In function ‘graticule’:
./fbpy/utils/fbutils.c:1221:15: warning: unused variable ‘dummycolor’ [-Wunused-variable]
  struct Color dummycolor;
               ^~~~~~~~~~
./fbpy/utils/fbutils.c:1214:6: warning: unused variable ‘j’ [-Wunused-variable]
  int j;
      ^
./fbpy/utils/fbutils.c: At top level:
./fbpy/utils/fbutils.c:1251:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int getHeight()
     ^~~~~~~~~
./fbpy/utils/fbutils.c:1256:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int getWidth()
     ^~~~~~~~
./fbpy/utils/fbutils.c:1454:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int mandelbrot()
     ^~~~~~~~~~
./fbpy/utils/fbutils.c: In function ‘read_PNG’:
./fbpy/utils/fbutils.c:1511:43: error: ‘png_infopp_NULL’ undeclared (first use in this function)
         png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
                                           ^~~~~~~~~~~~~~~
./fbpy/utils/fbutils.c:1511:43: note: each undeclared identifier is reported only once for each function it appears in
./fbpy/utils/fbutils.c:1544:25: error: ‘int_p_NULL’ undeclared (first use in this function)
        &interlace_type, int_p_NULL, int_p_NULL);
                         ^~~~~~~~~~
./fbpy/utils/fbutils.c: In function ‘write_PNG’:
./fbpy/utils/fbutils.c:1724:22: warning: variable ‘color_type’ set but not used [-Wunused-but-set-variable]
     int bit_depth=0, color_type;
                      ^~~~~~~~~~
./fbpy/utils/fbutils.c: In function ‘setblurrad’:
./fbpy/utils/fbutils.c:226:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
./fbpy/utils/fbutils.c: In function ‘tvsnow’:
./fbpy/utils/fbutils.c:598:2: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
  fread(snow_buf, 1, surfsize, fp);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

1 Answer 1

3

I'm presuming the context here is on a pi.

The error is from the C compiler, not about it. If you examine /usr/bin/gcc you'll notice it's a symlink to arm-linux-gnueabihf-gcc. That's not a cross-compiler, that's the native compiler.

./fbpy/utils/fbutils.c:1511:43: error: ‘png_infopp_NULL’ undeclared (first use in this function)
         png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);

This is an error caused by an mysterious identifier, png_infopp_NULL. This could be because of a header that's the wrong version, or some unusual path taken in the build process due to context.

You should have a look at /usr/include/python2.7/numpy/npy_1_7_deprecated_api.h. While I don't know anything about python modules, the rest of the half quoted warning, "Using deprecated NumPy API, disable it by..." might be worth reading and may even lead to a solution.

2
  • 1
    A header missing completely, probably would have killed the compile with a different error, but I agree that the compile is failing because of this error emitted by the compiler due to the symbol being undefined. Another possibility is that it's a macro value that was supposed to be defined via a -D flag on the command line. The warnings are not directly causing your problem, but they might also provide clues as to what's wrong, i.e. if you have the right headers / command line, all of those "prototype" warnings might also go away. Maybe.
    – Brick
    Commented Nov 30, 2017 at 16:28
  • Yeah, a missing header would throw a no-such-header error.
    – goldilocks
    Commented Nov 30, 2017 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.