Maxime2 / dataparksearch

An open source, feature rich search engine.
http://www.dataparksearch.org/
GNU General Public License v2.0
95 stars 45 forks source link

gcc5 make failed #5

Closed sburn closed 8 years ago

sburn commented 8 years ago

gcc version 5.3.0 (FreeBSD Ports Collection):

libtool: link: gcc5 -DHAVE_PTHREAD -pthread -DDPS_CONF_DIR=\"/usr/local/dpsearch/etc\" -DDPS_VAR_DIR=\"/usr/local/dpsearch/var\" -DDPS_SHARE_DIR=\"/usr/local/dpsearch/share\" -g -O3 -march=native -mtune=native -I/usr/local/include -I/usr/local/include -o .libs/filler.cgi filler_cgi-filler.o -pthread -pthread ./.libs/libdpsearch.so /usr/home/aiia/dpsearch-git/trunk/src/.libs/libdp.so -L/usr/local/lib -L/usr/local/lib/mysql ./.libs/libdpcharset.so -lpthread ./.libs/libdp.so -lcares -lidn -liconv -lperconaserverclient -lz -lm -pthread -Wl,-rpath -Wl,/usr/local/dpsearch/lib gcc5 -DHAVE_CONFIG_H -I. -I../include -I./../include -I/usr/local/include -I/usr/local/include -I/usr/local/include/mysql -DHAVE_PTHREAD -pthread -DDPS_CONF_DIR=\"/usr/local/dpsearch/etc\" -DDPS_VAR_DIR=\"/usr/local/dpsearch/var\" -DDPS_SHARE_DIR=\"/usr/local/dpsearch/share\" -g -O3 -march=native -mtune=native -I/usr/local/include -I/usr/local/include -MT indexer-main.o -MD -MP -MF .deps/indexer-main.Tpo -c -o indexer-main.o test -f 'main.c' || echo './'main.c main.c: In function 'main': main.c:1380:6: error: '_malloc_options' undeclared (first use in this function) _malloc_options = "ax3N"; ^ main.c:1380:6: note: each undeclared identifier is reported only once for each function it appears in *\ Error code 1

Stop. make[2]: stopped in /usr/home/aiia/dpsearch-git/trunk/src *\ Error code 1

Stop. make[1]: stopped in /usr/home/aiia/dpsearch-git/trunk/src *\ Error code 1

Stop. make: stopped in /usr/home/aiia/dpsearch-git/trunk

sburn commented 8 years ago

FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512:

libtool: link: cc -DHAVE_PTHREAD -pthread -DDPS_CONF_DIR=\"/usr/local/dpsearch/etc\" -DDPS_VAR_DIR=\"/usr/local/dpsearch/var\" -DDPS_SHARE_DIR=\"/usr/local/dpsearch/share\" -g -O3 -march=native -mtune=native -I/usr/local/include -I/usr/local/include -o .libs/filler.cgi filler_cgi-filler.o -pthread -pthread ./.libs/libdpsearch.so /usr/home/aiia/dpsearch-git/trunk/src/.libs/libdp.so -L/usr/local/lib -L/usr/local/lib/mysql ./.libs/libdpcharset.so -lpthread ./.libs/libdp.so -lcares -lidn -liconv -lperconaserverclient -lz -lm -pthread -Wl,-rpath -Wl,/usr/local/dpsearch/lib cc -DHAVE_CONFIG_H -I. -I../include -I./../include -I/usr/local/include -I/usr/local/include -I/usr/local/include/mysql -DHAVE_PTHREAD -pthread -DDPS_CONF_DIR=\"/usr/local/dpsearch/etc\" -DDPS_VAR_DIR=\"/usr/local/dpsearch/var\" -DDPS_SHARE_DIR=\"/usr/local/dpsearch/share\" -g -O3 -march=native -mtune=native -I/usr/local/include -I/usr/local/include -MT indexer-main.o -MD -MP -MF .deps/indexer-main.Tpo -c -o indexer-main.o test -f 'main.c' || echo './'main.c main.c:714:16: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (flags |= DPS_FLAG_SORT_POPRANK) flags |= DPS_FLAG_SORT_POPRANK_REV;


main.c:714:16: note: place parentheses around the assignment to silence this warning
            if (flags |= DPS_FLAG_SORT_POPRANK) flags |= DPS_FLAG_SORT_POPRANK_REV;
                      ^
                (                             )
main.c:714:16: note: use '!=' to turn this compound assignment into an inequality comparison
            if (flags |= DPS_FLAG_SORT_POPRANK) flags |= DPS_FLAG_SORT_POPRANK_REV;
                      ^~
                      !=
main.c:723:16: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
            if (flags |= DPS_FLAG_SORT_HOPS) flags |= DPS_FLAG_SORT_HOPS_REV;
                ~~~~~~^~~~~~~~~~~~~~~~~~~~~
main.c:723:16: note: place parentheses around the assignment to silence this warning
            if (flags |= DPS_FLAG_SORT_HOPS) flags |= DPS_FLAG_SORT_HOPS_REV;
                      ^
                (                          )
main.c:723:16: note: use '!=' to turn this compound assignment into an inequality comparison
            if (flags |= DPS_FLAG_SORT_HOPS) flags |= DPS_FLAG_SORT_HOPS_REV;
                      ^~
                      !=
main.c:1380:6: error: use of undeclared identifier '_malloc_options'
     _malloc_options = "ax3N";
     ^
2 warnings and 1 error generated.
**\* Error code 1

Stop.
make[2]: stopped in /usr/home/aiia/dpsearch-git/trunk/src
**\* Error code 1

Stop.
make[1]: stopped in /usr/home/aiia/dpsearch-git/trunk/src
**\* Error code 1

Stop.
make: stopped in /usr/home/aiia/dpsearch-git/trunk
sburn commented 8 years ago

Failed to compile under FreeBSD 10.3-RELEASE even with system version of GCC.

Maxime2 commented 8 years ago

FreeBSD starting with version 10 has a new memory allocator incompatible with malloc options of previous one. I have made and pushed changes which fix this issue. Thank you.