parallaxsw / OpenSTA

GNU General Public License v3.0
51 stars 23 forks source link

`cmake` fails when optional `tclreadline` library is missing #74

Closed akashlevy closed 3 months ago

akashlevy commented 3 months ago

You can easily test this by removing tcl-tclreadline-devel in the CentOS 7 Dockerfile. Here is the error you will get:

0.851 -- The CXX compiler identification is GNU 8.3.1                                                                                                                                                                                
0.862 -- Check for working CXX compiler: /opt/rh/devtoolset-8/root/usr/bin/c++                                                                                                                                                       
1.350 -- Check for working CXX compiler: /opt/rh/devtoolset-8/root/usr/bin/c++ - works                                                                                                                                               
1.352 -- Detecting CXX compiler ABI info                                                                                                                                                                                             
1.808 -- Detecting CXX compiler ABI info - done
1.829 -- Detecting CXX compile features
1.830 -- Detecting CXX compile features - done
1.831 -- STA version: 2.6.0
1.832 -- STA git sha: acd43bdd8a5f55382a6df0e6bc41e014024d522c
1.832 -- System name: Linux
1.832 -- Compiler: GNU 8.3.1
1.832 -- Build type: RELEASE
1.832 -- Build CXX_FLAGS: -O2 -DNDEBUG
1.832 -- Install prefix: /usr/local
1.854 -- Found FLEX: /usr/bin/flex (found version "2.5.37") 
1.868 -- Found BISON: /usr/bin/bison (found version "3.0.4") 
1.878 -- TCL library: /usr/lib64/libtcl.so
1.878 -- TCL header: /usr/include/tcl.h
1.889 -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7") 
1.892 -- Looking for C++ include pthread.h
2.352 -- Looking for C++ include pthread.h - found
2.352 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
2.829 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
2.830 -- Looking for pthread_create in pthreads
3.253 -- Looking for pthread_create in pthreads - not found
3.253 -- Looking for pthread_create in pthread
3.720 -- Looking for pthread_create in pthread - found
3.721 -- Found Threads: TRUE  
3.729 -- CUDD library: /usr/local/lib/libcudd.a
3.729 -- CUDD header: /usr/local/include/cudd.h
3.729 -- SSTA: 0
3.792 -- Found SWIG: /usr/bin/swig (found suitable version "3.0.12", minimum required is "3.0") 
3.799 -- STA executable: /OpenSTA/app/sta
3.801 -- Configuring done
3.803 CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
3.803 Please set them or make sure they are set and tested correctly in the CMake files:
3.803 /OpenSTA/TCL_READLINE_INCLUDE
3.803    used as include directory in directory /OpenSTA
3.803 
3.846 -- Generating done
3.847 CMake Generate step failed.  Build files cannot be regenerated correctly.
akashlevy commented 3 months ago

I am, of course, assuming that tclreadline is still optional...

akashlevy commented 3 months ago

Oh, I figured it out... USE_TCL_READLINE should be set to OFF.

jjcherry56 commented 3 months ago

It should not fail if it is ON and can't find it. 754dc625 tclreadline cmake

akashlevy commented 3 months ago

That was the behavior I was expecting, because that's how it operated pre v2.6.0.

Thanks for the fix