Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find "Q_WS_WIN", "Q_WS_QWS" and "Q_WS_MAC" during the cmake #10

Open
tomqingo opened this issue Jun 6, 2023 · 1 comment
Open

Comments

@tomqingo
Copy link

tomqingo commented Jun 6, 2023

Hello! I am following the AMFPlacer because we are doing the MLCAD2023 contest concerning the FPGA Macro placement. Because there is no requirement of timing, we use the AMF-Placer-ICCAD-2021 release. However, when I input "bash build.sh". An error indicates that there are some problems saying that it could not find "Q_WS_WIN", "Q_WS_QWS" and "Q_WS_MAC". The CMakeError.log is as follows:

Determining if the Q_WS_WIN exist failed with the following output:
Change Dir: /data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_ea17a/fast && /usr/bin/make  -f CMakeFiles/cmTC_ea17a.dir/build.make CMakeFiles/cmTC_ea17a.dir/build
make[1]: Entering directory '/data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_ea17a.dir/CheckSymbolExists.cxx.o
/data/ssd/hcli/usr/local/bin/g++   -I/usr/include/qt4  -O3 -fopenmp -O1 -g1    -o CMakeFiles/cmTC_ea17a.dir/CheckSymbolExists.cxx.o -c /data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx
/data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx: In function ‘int main(int, char**)’:
/data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:8:19: error: ‘Q_WS_WIN’ was not declared in this scope
    8 |   return ((int*)(&Q_WS_WIN))[argc];
      |                   ^~~~~~~~
CMakeFiles/cmTC_ea17a.dir/build.make:85: recipe for target 'CMakeFiles/cmTC_ea17a.dir/CheckSymbolExists.cxx.o' failed
make[1]: *** [CMakeFiles/cmTC_ea17a.dir/CheckSymbolExists.cxx.o] Error 1
make[1]: Leaving directory '/data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp'
Makefile:141: recipe for target 'cmTC_ea17a/fast' failed
make: *** [cmTC_ea17a/fast] Error 2


File /data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:
/* */
#include <QtCore/qglobal.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef Q_WS_WIN
  return ((int*)(&Q_WS_WIN))[argc];
#else
  (void)argc;
  return 0;
#endif
}
Determining if the Q_WS_QWS exist failed with the following output:
Change Dir: /data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_28b9d/fast && /usr/bin/make  -f CMakeFiles/cmTC_28b9d.dir/build.make CMakeFiles/cmTC_28b9d.dir/build
make[1]: Entering directory '/data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_28b9d.dir/CheckSymbolExists.cxx.o
/data/ssd/hcli/usr/local/bin/g++   -I/usr/include/qt4  -O3 -fopenmp -O1 -g1    -o CMakeFiles/cmTC_28b9d.dir/CheckSymbolExists.cxx.o -c /data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx
/data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx: In function ‘int main(int, char**)’:
/data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:8:19: error: ‘Q_WS_QWS’ was not declared in this scope
    8 |   return ((int*)(&Q_WS_QWS))[argc];
      |                   ^~~~~~~~
CMakeFiles/cmTC_28b9d.dir/build.make:85: recipe for target 'CMakeFiles/cmTC_28b9d.dir/CheckSymbolExists.cxx.o' failed
make[1]: *** [CMakeFiles/cmTC_28b9d.dir/CheckSymbolExists.cxx.o] Error 1
make[1]: Leaving directory '/data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp'
Makefile:141: recipe for target 'cmTC_28b9d/fast' failed
make: *** [cmTC_28b9d/fast] Error 2


File /data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:
/* */
#include <QtCore/qglobal.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef Q_WS_QWS
  return ((int*)(&Q_WS_QWS))[argc];
#else
  (void)argc;
  return 0;
#endif
}
Determining if the Q_WS_MAC exist failed with the following output:
Change Dir: /data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_64c06/fast && /usr/bin/make  -f CMakeFiles/cmTC_64c06.dir/build.make CMakeFiles/cmTC_64c06.dir/build
make[1]: Entering directory '/data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_64c06.dir/CheckSymbolExists.cxx.o
/data/ssd/hcli/usr/local/bin/g++   -I/usr/include/qt4  -O3 -fopenmp -O1 -g1    -o CMakeFiles/cmTC_64c06.dir/CheckSymbolExists.cxx.o -c /data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx
/data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx: In function ‘int main(int, char**)’:
/data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:8:19: error: ‘Q_WS_MAC’ was not declared in this scope
    8 |   return ((int*)(&Q_WS_MAC))[argc];
      |                   ^~~~~~~~
CMakeFiles/cmTC_64c06.dir/build.make:85: recipe for target 'CMakeFiles/cmTC_64c06.dir/CheckSymbolExists.cxx.o' failed
make[1]: *** [CMakeFiles/cmTC_64c06.dir/CheckSymbolExists.cxx.o] Error 1
make[1]: Leaving directory '/data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp'
Makefile:141: recipe for target 'cmTC_64c06/fast' failed
make: *** [cmTC_64c06/fast] Error 2


File /data/ssd/qluo/AMF-Placer-ICCAD-2021/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:
/* */
#include <QtCore/qglobal.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef Q_WS_MAC
  return ((int*)(&Q_WS_MAC))[argc];
#else
  (void)argc;
  return 0;
#endif
}

I have checked that we have already installed Qt 4 and Qt 5. And I do not know how to solve this problem. Could you help me to see why it would happen and how to deal with it.

Thanks,
Qin

@zslwyuan
Copy link
Owner

zslwyuan commented Jun 10, 2023

Hi @tomqingo
It is related to the default dependencies of Eigen3. The problem can be resolved by disabling Eigen3 test at this line: https://github.com/zslwyuan/AMF-Placer/blob/ICCAD-2021/src/lib/3rdParty/eigen3-src/CMakeLists.txt#LL481C1-L481C59
You might also encounter problem of generating Eigen3 Doc, so you can disable documentation at this line: https://github.com/zslwyuan/AMF-Placer/blob/ICCAD-2021/src/lib/3rdParty/eigen3-src/CMakeLists.txt#L475

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants