flang-compiler / f18

F18 is a front-end for Fortran intended to replace the existing front-end in the Flang compiler
230 stars 48 forks source link

Restore the ability to build shared libraries (not complete). #1095

Closed ghost closed 4 years ago

ghost commented 4 years ago

Fixes #1092 Still getting errors when linking FortranParser.

ghost commented 4 years ago
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:284: error: undefined reference to 'Fortran::common::Deleter<Fortran::evaluate::GenericExprWrapper>::operator()(Fortran::evaluate::GenericExprWrapper*) const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:284: error: undefined reference to 'Fortran::common::Deleter<Fortran::evaluate::GenericAssignmentWrapper>::operator()(Fortran::evaluate::GenericAssignmentWrapper*) const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:284: error: undefined reference to 'Fortran::common::Deleter<Fortran::evaluate::ProcedureRef>::operator()(Fortran::evaluate::ProcedureRef*) const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:394: error: undefined reference to 'Fortran::common::Deleter<Fortran::evaluate::GenericExprWrapper>::operator()(Fortran::evaluate::GenericExprWrapper*) const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:394: error: undefined reference to 'Fortran::common::Deleter<Fortran::evaluate::GenericAssignmentWrapper>::operator()(Fortran::evaluate::GenericAssignmentWrapper*) const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81: error: undefined reference to 'Fortran::evaluate::GenericExprWrapper::~GenericExprWrapper()'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81: error: undefined reference to 'Fortran::evaluate::GenericAssignmentWrapper::~GenericAssignmentWrapper()'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
lib/Parser/CMakeFiles/FortranParser.dir/build.make:116: recipe for target 'lib/libFortranParser.so.11git' failed
make[3]: *** [lib/libFortranParser.so.11git] Error 1
CMakeFiles/Makefile2:1426: recipe for target 'lib/Parser/CMakeFiles/FortranParser.dir/all' failed
make[2]: *** [lib/Parser/CMakeFiles/FortranParser.dir/all] Error 2
CMakeFiles/Makefile2:1433: recipe for target 'lib/Parser/CMakeFiles/FortranParser.dir/rule' failed
make[1]: *** [lib/Parser/CMakeFiles/FortranParser.dir/rule] Error 2
Makefile:526: recipe for target 'FortranParser' failed
make: *** [FortranParser] Error 2

I think that FortranParser is depending on FortranEvaluate. https://github.com/flang-compiler/f18/blob/master/lib/Parser/parse-tree.cpp#L18 Someone has to resolve this cycle-dependency between FortranParser and FortranEvaluate.