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

HPX fails to build with enabled hdf5 examples #2748

Closed
arturas-venskus-flf opened this issue Jul 7, 2017 · 10 comments
Closed

HPX fails to build with enabled hdf5 examples #2748

arturas-venskus-flf opened this issue Jul 7, 2017 · 10 comments

Comments

@arturas-venskus-flf
Copy link

Hi,

HPX fails to build when flag -DHPX_WITH_EXAMPLES_HDF5=On is passed to cmake.
HDF5 library is present in system and reported by cmake as found.

Best,
Arturas

@hkaiser
Copy link
Member

hkaiser commented Jul 7, 2017

@arturas-venskus-flf: Would you mind posting your cmake output and build logs, please?

@hkaiser hkaiser added this to the 1.1.0 milestone Jul 7, 2017
@arturas-venskus-flf
Copy link
Author

arturas-venskus-flf commented Jul 7, 2017

Error occurred during linking stage. From CMakeError.log: /usr/bin/ld cannot find -lpthreads
System contains libpthread.so but not libpthreads.so. Maybe somewhere is misspelled library name as stated for example here https://stackoverflow.com/questions/37967086/usr-bin-ld-cannot-find-lpthreads.

Sorry cannot post output and logs due to company's policy
Arturas

@hkaiser
Copy link
Member

hkaiser commented Jul 7, 2017

@arturas-venskus-flf: We do not add -lthreads to our build scripts anywhere. The only thing we do is to add -pthread to the compiler command line, if appropriate.

What version of cmake do you use. We've had issues with certain cmake versions before...

Also, what target failed to link for you?

@arturas-venskus-flf
Copy link
Author

@hkaiser: CMake version is 3.5.1. Failures in CMakeError:

  1. Determining if the pthread_create exist failed ... CheckSymbolsExists.c undefined reference to 'pthread_create'

  2. Determining if the function pthread_create exist in the pthread failed ... CheckFunctionExists.c ... /usr/bin/ld cannot find -lpthreads

@hkaiser
Copy link
Member

hkaiser commented Jul 7, 2017

@arturas-venskus-flf from what I can see, this error message you're seeing is produced by one of the feature tests automatically generated by cmake. This should have no impact on building HPX at all as this test is invoked to figure out what library is exporting the pthread symbols on the current platform (some platforms have libthread.so, some libthreads.so).

Is this error in the cmake log the only 'indication' that something is 'wrong'?

@arturas-venskus-flf
Copy link
Author

arturas-venskus-flf commented Jul 8, 2017

@hkaiser I was able to reproduce issue in my laptop. Please find error, output and cout dump files attached:
CMakeError.txt
CMakeOutput.txt
install_hpx.txt
In install_hpx.txt also other cmake errors are captured.

@hkaiser
Copy link
Member

hkaiser commented Jul 8, 2017

@arturas-venskus-flf Thanks.

Could you please provide the following additional information:

  • cmake version
  • gcc version
  • HPX version
  • cmake command line

Also, from what I can see from those logs, the -lpthreads problem you listed above is a non-issue. Something else is wrong. I also think that this issue is unrelated to enabling the HDF5 examples.

@hkaiser
Copy link
Member

hkaiser commented Jul 9, 2017

Ok, I saw now, that you're using gcc 6.2. Are those logs still generated by cmake 3.5.1?

@arturas-venskus-flf
Copy link
Author

arturas-venskus-flf commented Jul 9, 2017

gcc 6.2
cmake 3.5.1 (with 3.8.2 the same issue)
HPX version 1.0.0
command: cmake -DCMAKE_CXX_FLAGS=-std=c++14 -DCMAKE_INSTALL_PREFIX=/opt/hpx_1.0.0 -DHWLOC_ROOT=/usr -DHPX_WITH_MALLOC=system -DHPX_WITH_EXAMPLES_HDF5=On /home/USER/Libs/hpx_1.0.0 | tee install_hpx.log

CMakeError.txt list problem related to lpthreads

I've succeeded to compile hpx core, tests, examples, examples with tbb, openmp. Only the problem appears when -DHPX_WITH_EXAMPLES_HDF5=On is passed to cmake, otherwise compilation is ok.

@hkaiser
Copy link
Member

hkaiser commented Jul 10, 2017

@arturas-venskus-flf Ok, thanks for this information. I think we can close this issue at this point as the HDF5 examples are massively broken in V1.0.0 anyways (I just fixed them here: #2749, if you really need them, the fixed examples should compile fine against V1.0.0 - although I have not tried it).

I'd suggest you don't use -DHPX_WITH_EXAMPLES_HDF5 with this version of HPX.

Thanks for reporting this issue! I have started start a list of known issues with V1.0.0 for others to avoid running into those problems: https://github.com/STEllAR-GROUP/hpx/wiki/Known-issues-in-HPX-V1.0.0.

Please feel free to reopen this issue if needed.

@hkaiser hkaiser closed this as completed Jul 10, 2017
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

2 participants