UCBerkeleySETI / gbt_seti

Tools for SETI observations with the GUPPI and Breakthrough Listen instruments.
http://seti.berkeley.edu
9 stars 4 forks source link

undefined reference to `quantize_2bit' #4

Open gijzelaerr opened 6 years ago

gijzelaerr commented 6 years ago
λ  make
cc -Wno-unused-result -O3 -Wall -Werror=return-local-addr -DUSE_LIBS3_20 -DFOLD_USE_INTRINSICS -I/opt/vegas/include -I/usr/include/cfitsio -I/usr/include/mysql -I/usr/local/cuda/include -I/usr/include/libbson-1.0 -I/usr/include/libmongoc-1.0  -I/usr/local/include -I/usr/local/include/libbson-1.0 -I/usr/local/include/libmongoc-1.0 raw_quant.c -o raw_quant guppi_status.o guppi_databuf.o guppi_udp.o guppi_error.o guppi_params.o guppi_time.o median.o setimysql.o imswap.o write_psrfits.o read_psrfits.o misc_utils.o read_filterbank_header.o filterbankutil.o fold.o polyco.o hget.o hput.o sla.o downsample.o barycenter.o chkio.o s3util.o -L/opt/vegas/lib -I/opt/vegas/include -L/usr/local/cuda/lib64 -lfftw3f_threads -lcfitsio -lm -lgsl -lgslcblas -lpthread -I/usr/include/cfitsio -lfftw3f -L/usr/lib64/mysql -lmysqlclient -lcufft -lcudart -Lslalib -ls3 -lmongoc-1.0 -lbson-1.0 -lstdc++  -lsla
raw_quant.c: In function ‘main’:
raw_quant.c:45:8: warning: unused variable ‘b’ [-Wunused-variable]
  int a,b,c;
        ^
raw_quant.c:45:6: warning: unused variable ‘a’ [-Wunused-variable]
  int a,b,c;
      ^
raw_quant.c:44:19: warning: unused variable ‘z’ [-Wunused-variable]
  long int x=0,y=0,z=0;
                   ^
/tmp/ccNkCIIn.o: In function `main':
raw_quant.c:(.text.startup+0x4d7): undefined reference to `quantize_2bit'
collect2: error: ld returned 1 exit status
Makefile:151: recipe for target 'raw_quant' failed
make: *** [raw_quant] Error 1

My guess is that gcc 7.3.0 uses C99 standard now, and the semantics for inlines are different.

https://stackoverflow.com/questions/19068705/undefined-reference-when-calling-inline-function

gijzelaerr commented 6 years ago

fixed in https://github.com/UCBerkeleySETI/gbt_seti/pull/5