| # Problems building - undefined reference to `ord::getLogger()' | |
| Subcategory: Compilation error | |
| ## Conversation | |
| ### oharboe | |
| Any idea what is going on here? | |
| ``` | |
| ./build_openroad.sh --local --openroad-args "-D CMAKE_BUILD_TYPE=RELEASE" | |
| [deleted] | |
| TIMEOUT=5 -D TEST_XML_OUTPUT_DIR= -P /home/oyvind/ascenium/OpenROAD-flow-scripts/dependencies/share/cmake-3.24/Modules/GoogleTestAddTests.cmake | |
| /usr/bin/ld: src/utl/utl.a(LoggerCommon.cpp.o): in function `utl::report(char const*)': | |
| LoggerCommon.cpp:(.text+0x18f): undefined reference to `ord::getLogger()' | |
| /usr/bin/ld: src/utl/utl.a(LoggerCommon.cpp.o): in function `utl::open_metrics(char const*)': | |
| LoggerCommon.cpp:(.text+0x2e9): undefined reference to `ord::getLogger()' | |
| /usr/bin/ld: src/utl/utl.a(LoggerCommon.cpp.o): in function `utl::close_metrics(char const*)': | |
| LoggerCommon.cpp:(.text+0x309): undefined reference to `ord::getLogger()' | |
| /usr/bin/ld: src/utl/utl.a(LoggerCommon.cpp.o): in function `utl::set_metrics_stage(char const*)': | |
| LoggerCommon.cpp:(.text+0x32e): undefined reference to `ord::getLogger()' | |
| /usr/bin/ld: src/utl/utl.a(LoggerCommon.cpp.o): in function `utl::clear_metrics_stage()': | |
| LoggerCommon.cpp:(.text+0x369): undefined reference to `ord::getLogger()' | |
| /usr/bin/ld: src/utl/utl.a(LoggerCommon.cpp.o):LoggerCommon.cpp:(.text+0x38e): more undefined references to `ord::getLogger()' follow | |
| collect2: error: ld returned 1 exit status | |
| ``` | |
| ### vijayank88 | |
| @oharboe | |
| Have you removed `OpenROAD-flow-scripts/tools` directory before building again. | |
| Sometimes it may cause the issue. | |
| @vvbandeira Can please check this? | |
| ### maliberty | |
| which binary is it building when the error happens? | |
| ### oharboe | |
| Rejoice! I finally got it to compile. I deleted the *entire* ORFS folder, recloned, reran sudo ./setup.sh and then the build worked. | |
| So, somewhere inside the ORFS folder there was an out of date file that wasn't being built... | |
| It would be nice to know what exactly is going wrong, but I guess that will have to wait until next time it breaks and I do some more investigations? | |