https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87249

            Bug ID: 87249
           Summary: Undefined reference within a header
           Product: gcc
           Version: 8.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eftaxi12 at otenet dot gr
  Target Milestone: ---

Compiles fine with g++-7.3.

*.i file was not created (or not found).

Below is the command and its output:



$ g++ -v -save-temps -Wall -Wextra -Wl,-z,relro -Wl,--as-needed  -g 
-fsanitize=undefined -fno-strict-aliasing -fwrapv
-fno-aggressive-loop-optimizations -fstack-protector-strong -Wformat
-Werror=format-security -DNDEBUG -O3 -mmmx -mavx -DBAMG_LONG_LONG  -DNCHECKPTR
-fPIC  -Wl,-z,relro -Wl,--as-needed -rdynamic -o FreeFem++ sansrgraph.o
parallelempi-empty.o ffapi.o ../lglib/liblg.a ../fflib/libff.a -lumfpack  -lamd
-lcholmod -lcolamd -larpack -llapack -lblas -ldl -lm -lrt 
/usr/lib/gcc/x86_64-linux-gnu/8/libgfortran.so
/usr/lib/gcc/x86_64-linux-gnu/8/libquadmath.so
-L/usr/lib/x86_64-linux-gnu/hdf5/serial   -lm -ldl -lz -lsz -lpthread  -lhdf5
-lhdf5_hl
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 8.2.0-5'
--with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-8
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie
--with-system-zlib --with-target-system-zlib --enable-objc-gc=auto
--enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 8.2.0 (Debian 8.2.0-5) 
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-Wall' '-Wextra' '-g'
'-fsanitize=undefined' '-fno-strict-aliasing' '-fwrapv'
'-fno-aggressive-loop-optimizations' '-fstack-protector-strong' '-Wformat=1'
'-Werror=format-security' '-D' 'NDEBUG' '-O3' '-mmmx' '-mavx' '-D'
'BAMG_LONG_LONG' '-D' 'NCHECKPTR' '-fPIC' '-rdynamic' '-o' 'FreeFem++'
'-L/usr/lib/x86_64-linux-gnu/hdf5/serial' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/8/collect2 -plugin
/usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so
-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
-plugin-opt=-fresolution=-lm.res -plugin-opt=-pass-through=-lgcc_s
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/
--build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -export-dynamic
-dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o FreeFem++
/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/Scrt1.o
/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/8/crtbeginS.o
-L/usr/lib/x86_64-linux-gnu/hdf5/serial -L/usr/lib/gcc/x86_64-linux-gnu/8
-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib -L/lib/x86_64-linux-gnu
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/8/../../.. -z relro --as-needed -z relro
--as-needed sansrgraph.o parallelempi-empty.o ffapi.o ../lglib/liblg.a
../fflib/libff.a -lumfpack -lamd -lcholmod -lcolamd -larpack -llapack -lblas
-ldl -lrt /usr/lib/gcc/x86_64-linux-gnu/8/libgfortran.so
/usr/lib/gcc/x86_64-linux-gnu/8/libquadmath.so -lm -ldl -lz -lsz -lpthread
-lhdf5 -lhdf5_hl -lstdc++ -lm -lubsan -lgcc_s -lgcc -lc -lgcc_s -lgcc
/usr/lib/gcc/x86_64-linux-gnu/8/crtendS.o
/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/crtn.o
/usr/bin/ld: ../fflib/libff.a(lgfem.o): in function `TypeSolve<true,
Solve>::SolveInit::operator()(void*) const':
/home/eftaxiop/Αρχεία/Γενικά/Λογισμικό/freefem++/Δημιουργία_πακέτου_για_το_Debian_Linux/freefem++/src/fflib/problem.hpp:493:
undefined reference to `AnyTypeWithOutCheck Problem::eval<double,
Fem2D::GFESpace<Fem2D::Mesh3>, v_fes3>(void*,
Problem::Data<Fem2D::GFESpace<Fem2D::Mesh3> >*,
CountPointer<MatriceCreuse<double> >&,
MatriceCreuse<CadnaType<double>::Scalaire>*&) const'
/usr/bin/ld:
/home/eftaxiop/Αρχεία/Γενικά/Λογισμικό/freefem++/Δημιουργία_πακέτου_για_το_Debian_Linux/freefem++/src/fflib/problem.hpp:491:
undefined reference to `AnyTypeWithOutCheck Problem::eval<std::complex<double>,
Fem2D::GFESpace<Fem2D::Mesh3>, v_fes3>(void*,
Problem::Data<Fem2D::GFESpace<Fem2D::Mesh3> >*,
CountPointer<MatriceCreuse<std::complex<double> > >&,
MatriceCreuse<CadnaType<std::complex<double> >::Scalaire>*&) const'
/usr/bin/ld:
/home/eftaxiop/Αρχεία/Γενικά/Λογισμικό/freefem++/Δημιουργία_πακέτου_για_το_Debian_Linux/freefem++/src/fflib/problem.hpp:484:
undefined reference to `AnyTypeWithOutCheck Problem::eval<double,
Fem2D::FESpace, v_fes>(void*, Problem::Data<Fem2D::FESpace>*,
CountPointer<MatriceCreuse<double> >&,
MatriceCreuse<CadnaType<double>::Scalaire>*&) const'
collect2: error: ld returned 1 exit status

Reply via email to