[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[task #13658] Work on concave polygons too
From: |
Mohammad Akhlaghi |
Subject: |
[task #13658] Work on concave polygons too |
Date: |
Fri, 3 Apr 2020 23:20:20 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0 |
Follow-up Comment #37, task #13658 (project gnuastro):
I tried the build, but it crashed when building `onecrop.c':
gcc -DHAVE_CONFIG_H -I. -I/path/to/gnuastro/source/bin/crop -I../..
-I\/path/to/gnuastro/source/bootstrapped/lib -I\/path/to/gnuastro/source/lib
-Wall -g -O0 -pthread -MT onecrop.o -MD -MP -MF $depbase.Tpo -c -o onecrop.o
/path/to/gnuastro/source/bin/crop/onecrop.c &&\
mv -f $depbase.Tpo $depbase.Po
In file included from /path/to/gnuastro/source/bin/crop/onecrop.c:37:
/path/to/gnuastro/source/lib/gnuastro/polygon.h:64:1: warning: useless storage
class specifier in empty declaration
64 | };
| ^
In file included from /path/to/gnuastro/source/bin/crop/onecrop.c:37:
/path/to/gnuastro/source/lib/gnuastro/polygon.h:102:1: warning:
‘polygon_leftmost_point’ declared ‘static’ but never defined
[-Wunused-function]
102 | polygon_leftmost_point(double *in, size_t n);
| ^~~~~~~~~~~~~~~~~~~~~~
/path/to/gnuastro/source/lib/gnuastro/polygon.h:105:1: warning:
‘polygon_rightmost_point’ declared ‘static’ but never defined
[-Wunused-function]
105 | polygon_rightmost_point(double *in, size_t n);
| ^~~~~~~~~~~~~~~~~~~~~~~
/path/to/gnuastro/source/lib/gnuastro/polygon.h:108:1: warning:
‘polygon_leftof_vector’ declared ‘static’ but never defined
[-Wunused-function]
108 | polygon_leftof_vector(double *in, size_t n, double x, double y);
| ^~~~~~~~~~~~~~~~~~~~~
/path/to/gnuastro/source/lib/gnuastro/polygon.h:111:1: warning:
‘polygon_make_arr’ declared ‘static’ but never defined
[-Wunused-function]
111 | polygon_make_arr(double *in, size_t n, size_t *A_size, size_t
*B_size,
| ^~~~~~~~~~~~~~~~
/path/to/gnuastro/source/lib/gnuastro/polygon.h:115:1: warning: ‘compareA’
declared ‘static’ but never defined [-Wunused-function]
115 | compareA(const void *a, const void *b);
| ^~~~~~~~
/path/to/gnuastro/source/lib/gnuastro/polygon.h:118:1: warning: ‘compareB’
declared ‘static’ but never defined [-Wunused-function]
118 | compareB(const void *a, const void *b);
| ^~~~~~~~
/bin/sh ../../libtool --tag=CC --mode=link gcc -Wall -g -O0 -pthread
-L\../../lib -o astcrop main.o ui.o crop.o wcsmode.o onecrop.o
../../bootstrapped/lib/libgnu.la -lgnuastro -lpthread
libtool: link: gcc -Wall -g -O0 -pthread -o astcrop main.o ui.o crop.o
wcsmode.o onecrop.o -L../../lib ../../bootstrapped/lib/.libs/libgnu.a
/usr/local/lib/libgnuastro.so -lgit2 -ltiff -llzma -ljpeg -lwcs -lcfitsio
-lcurl -lz -lgsl -lgslcblas -lm -lc -lpthread -pthread -Wl,-rpath
-Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib
/usr/bin/ld: onecrop.o: in function `polygonmask':
/path/to/gnuastro/source/bin/crop/onecrop.c:369: undefined reference to
`gal_polygon_vertices_sort_convex'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:2001: astcrop] Error 1
make[2]: Target 'all' not remade because of errors.
make[2]: Leaving directory '/dev/shm/source-0.11.155-4d3d/bin/crop'
Didn't you get this error when compiling?
The reason is that you have declared static functions in the `polygon.h'
header!!! Static functions are by definition only available within one
particular compilation. You can't link to them in other files.
To fix this, remove the declaration of static files from `polygon.h'. Static
files must not be in header files (which are loaded into every `.c' file that
they are used in).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/task/?13658>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [task #13658] Work on concave polygons too, Sachin Kumar Singh, 2020/04/02
- [task #13658] Work on concave polygons too, Sachin Kumar Singh, 2020/04/02
- [task #13658] Work on concave polygons too,
Mohammad Akhlaghi <=
- [task #13658] Work on concave polygons too, Sachin Kumar Singh, 2020/04/04
- [task #13658] Work on concave polygons too, Mohammad Akhlaghi, 2020/04/05
- [task #13658] Work on concave polygons too, Sachin Kumar Singh, 2020/04/06
- [task #13658] Work on concave polygons too, Mohammad Akhlaghi, 2020/04/07
- [task #13658] Work on concave polygons too, Mohammad Akhlaghi, 2020/04/07
- [task #13658] Work on concave polygons too, Sachin Kumar Singh, 2020/04/08
- [task #13658] Work on concave polygons too, Mohammad Akhlaghi, 2020/04/08
- [task #13658] Work on concave polygons too, Sachin Kumar Singh, 2020/04/08
- [task #13658] Work on concave polygons too, Mohammad Akhlaghi, 2020/04/08
- [task #13658] Work on concave polygons too, Sachin Kumar Singh, 2020/04/09