EarthScope / evalresp

Evaluates instrument responses in FDSN and derivative formats
GNU Lesser General Public License v3.0
12 stars 2 forks source link

Build fails with gcc 4.8.5 #33

Closed andrewcooke-isti closed 7 years ago

andrewcooke-isti commented 7 years ago

gcc 4.8.5 on OpenSuse - a whole slew of errors from the regexp code.

dricki commented 7 years ago

Is this an issue with modified code? Does it work with 4.0.6?

andrewcooke-isti commented 7 years ago

it's an issue with master. i don't know about previous releases.

dricki commented 7 years ago

What happens if you build a released version on that platform? http://ds.iris.edu/ds/nodes/dmc/software/downloads/evalresp/4-0-6/

andrewcooke-isti commented 7 years ago

i don't know. i am working on getting clang-format working.

andrewcooke-isti commented 7 years ago

yes - looks pretty much identical.

andrew@block:~/project/evalresp-4.0.6> make
make  all-recursive
make[1]: Entering directory '/home/andrew/project/evalresp-4.0.6'
Making all in src
make[2]: Entering directory '/home/andrew/project/evalresp-4.0.6/src'
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -I /usr/include/libxml2  -O0 -Wall -Werror -Wunused-but-set-variable -MT regexp.lo -MD -MP -MF .deps/regexp.Tpo -c -o regexp.lo regexp.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I /usr/include/libxml2 -O0 -Wall -Werror -Wunused-but-set-variable -MT regexp.lo -MD -MP -MF .deps/regexp.Tpo -c regexp.c  -fPIC -DPIC -o .libs/regexp.o
regexp.c: In function ‘evr_regcomp’:
regexp.c:218:5: error: call to function ‘regc’ without a real prototype [-Werror=unprototyped-calls]
     regc(MAGIC);
     ^
regexp.c:178:13: note: ‘regc’ was declared here
 STATIC void regc();
             ^
regexp.c:219:5: error: call to function ‘reg’ without a real prototype [-Werror=unprototyped-calls]
     if (reg(0, &flags) == NULL)
     ^
regexp.c:172:14: note: ‘reg’ was declared here
 STATIC char *reg();
              ^
...
smellyfis commented 7 years ago

Centos 6 uses gcc 4.8.5 and regexp.c successfully installs. Will try to get an opensuse instance to try to reproduce

andrewcooke-isti commented 7 years ago

is the call to gcc the same as the cut+paste above? same options?

smellyfis commented 7 years ago

no because libxml2 is nolonger needed and the folder structure is different now

andrewcooke-isti commented 7 years ago

ok, but are the compiler options the same!? (the ones that would influence the error - the error flags etc)

smellyfis commented 7 years ago

there is no -fPIC or -DPIC

when building on opensuse leap 42.2 I get an error while running ./configure about it failing to remove libtoolT

smellyfis commented 7 years ago

The declerations of the functions inside of libsrc/evalresp/regexp.c are not complete. To resolve I am going to explicitly declare the functions

andrewcooke-isti commented 7 years ago

that libtool error sounds familiar (although i dont see it right now) - iirc i googled it and found it wasn't important.