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

Cannot build MiniGhost #1255

Closed
pagrubel opened this issue Sep 11, 2014 · 9 comments
Closed

Cannot build MiniGhost #1255

pagrubel opened this issue Sep 11, 2014 · 9 comments

Comments

@pagrubel
Copy link
Member

tried
cmake -DHPX_DIR=$HOME/build/hpx_buildidle ~/hpx_miniapps/miniapps/MiniGhost

which gave me this error:

The CXX compiler identification is GNU 4.9.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Warning at CMakeLists.txt:23 (find_package):
By not providing "FindHPX.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "HPX", but
CMake did not find one.

Could not find a package configuration file provided by "HPX" with any of
the following names:

HPXConfig.cmake
hpx-config.cmake

Add the installation prefix of "HPX" to CMAKE_PREFIX_PATH or set "HPX_DIR"
to a directory containing one of the above files. If "HPX" provides a
separate development package or SDK, be sure it has been installed.

CMake Error at src/CMakeLists.txt:12 (add_hpx_executable):
Unknown CMake command "add_hpx_executable".

-- Configuring incomplete, errors occurred!

so I tried this
cmake -DHPX_DIR=$HOME/build/hpx_buildidle/CMakeFiles ~/hpx_miniapps/miniapps/MiniGhost
FATALHPX_ROOT not set, unable to find HPX!
-- The CXX compiler identification is GNU 4.9.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at /home/pagrubel/build/hpx_buildidle/CMakeFiles/HPXConfig.cmake:7 (include):
include could not find load file:

/home/pagrubel/build/hpx_buildidle/CMakeFiles/HPXTargets.cmake

Call Stack (most recent call first):
CMakeLists.txt:23 (find_package)

-- The C compiler identification is GNU 4.9.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- Found TCMalloc: /usr/lib/libtcmalloc_minimal.so
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_CFREE
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_CFREE - Success
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_CFREE
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_CFREE - Success
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_PVALLOC
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_PVALLOC - Success
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_PVALLOC
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_PVALLOC - Success
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_MALLOC
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_MALLOC - Success
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_MALLOC
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_MALLOC - Success
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_FREE
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_FREE - Success
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_FREE
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_FREE - Success
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_CALLOC
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_CALLOC - Success
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_CALLOC
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_CALLOC - Success
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_REALLOC
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_REALLOC - Success
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_REALLOC
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_REALLOC - Success
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_VALLOC
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_VALLOC - Success
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_VALLOC
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_VALLOC - Success
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_MEMALIGN
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_MEMALIGN - Success
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_MEMALIGN
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_MEMALIGN - Success
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_POSIX_MEMALIGN
-- Performing Test HPX_WITH_CXX_FLAG_FNO_BUILTIN_POSIX_MEMALIGN - Success
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_POSIX_MEMALIGN
-- Performing Test HPX_WITH_C_FLAG_FNO_BUILTIN_POSIX_MEMALIGN - Success
-- Using tcmalloc allocator.
-- Configuring incomplete, errors occurred!

@sithhell
Copy link
Member

HPX_DIR does not point to the correct path.
Please consult the documentation:
http://stellar-group.github.io/hpx/docs/html/hpx/manual/build_system/using_hpx/using_hpx_cmake.html

look for HPX_DIR.

Does this solve your problem?

@pagrubel
Copy link
Member Author

cmake -DHPX_DIR=$HOME/build/hpx_buildidle/lib/cmake/hpx ~/hpx_miniapps/miniapps/MiniGhost

built it in /src

doesn't seem to matter since it won't run but that's another issue

@sithhell
Copy link
Member

Is this issue resolved now?

@pagrubel
Copy link
Member Author

How do I direct where the binary is built

@sithhell sithhell self-assigned this Sep 14, 2014
@sithhell
Copy link
Member

This is done via cmake. Why is that important? It needs to be done by the project that is compiling that executable (Look into CMake's output paths). That's not a problem of HPX though.

@hkaiser
Copy link
Member

hkaiser commented Sep 14, 2014

Is all of this properly documented in our docs?

@sithhell
Copy link
Member

Is this really something we need to document? It's something quite specifc to the external project itself and should be documented there instead of documented in the HPX docs.

@sithhell sithhell reopened this Sep 14, 2014
@sithhell
Copy link
Member

I think we should document how to build external projects with HPX and
what needs to be done to make those apps run properly.

The external build support is explained in those two sections:
http://stellar-group.github.io/hpx/docs/html/hpx/manual/build_system/using_hpx.html

What's missing (please also see #1247 which should get fixed until 0.9.9)?

@sithhell
Copy link
Member

By default CMake places the binaries in the directory where you call add_executable or similar.
If you want to have them placed in bin or lib or similar, you can do so by tell cmake via the *_OUTPUT_DIRECTORY variables.
The HPX build system does this in the cmake/HPX_SetOutputPaths.cmake. This script is not included by default in external builds, because we can't guess what the resulting layout of an external project will be. To mimic HPX's behaviour, you can do so by adding include(HPX_SetOutputPaths) after find_package(HPX).

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

No branches or pull requests

3 participants