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
Fixing compilation issues with external example #2013
Conversation
hkaiser
commented
Mar 4, 2016
- also: fix documentation (remove stubs, remove mentioning of ini files)
- this fixes Compilation error while running sample hello_world_component code #2011 and pkg-config order incorrect on 14.04 / GCC 4.8 #2009
- also: fix documentation (remove stubs)
@satyaki3794: Could you please verify whether this fixes your problem? |
The directory hpx/examples/hello_world_component has hello.sh which contains the commands needed to build and run this example. I am not sure about this but I think some of the commands in that file are incorrect/incomplete. Compilation fails at the first step, while generating the .so file, which can be fixed by adding the -fPIC flag. After that has been fixed, when I run ./hello.sh, I get the following compilation errors. http://pastebin.com/crgQsFwy. Maybe, like this issue (#2009), the pkgconfig order in the .pc file is incorrect here too. I tried permuting the order of binaries like zao had done in the above case but to no avail. |
I now added the -fPIC to the pkgcfg options. I also tried to compile it again, seems to work now. |
I built the 'fixing_2011' branch and ran hello.sh in hpx/examples/hello_world_component. I got the same compilation errors yet again (http://pastebin.com/C5HeFxtB). As the errors were regarding undefined references (to hpx::cout, write_async() etc.), I searched online and found a similar issue (#268). The c++ command to run hello_world_client.cpp after generating the .so file, has the -lhpx_iostreams flag, and my LD_LIBRARY_PATH environment variable points to $HPX_INSTALL_LOCATION/lib. I am on Ubuntu 14.04 with gcc 4.8.2. |
@satyaki3794 I changed the pkgcfg files such that the HPX libraries are referenced by full file name. As outlined in #2009, this should at least fix that first issue you reported. I'm still not clear why you see those hpx::cout et.al. as missing symbols. They should be defined in |
Please move the -lhpx_iostreams flag to the end of the command while compiling hello_world_client.cpp. It resolves the compilation errors. |
I built and tested the changes. Everything is working as expected. |
Fixing compilation issues with external example