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

Many examples do not link with Git HEAD version #707

Closed
jewillco opened this issue Feb 11, 2013 · 5 comments

Comments

Projects
None yet
2 participants
@jewillco
Copy link

commented Feb 11, 2013

When trying to build examples, many of them produce errors such as:

CMakeFiles/hello_world_exe.dir/hello_world.cpp.o: In function `(anonymous namespace)::hpx_plugin_exporter_factory_HPX_COMPONENT_NAME_hello_world_foreman_action::hpx_plugin_exporter_factory_HPX_COMPONENT_NAME_hello_world_foreman_action()':
hello_world.cpp:(.text+0x10f6): undefined reference to `hpx_exported_plugins_list_HPX_COMPONENT_NAME_factory'               
CMakeFiles/hello_world_exe.dir/hello_world.cpp.o: In function `(anonymous namespace)::hpx_plugin_exporter_registry_HPX_COMPONENT_NAME_hello_world_worker_action::hpx_plugin_exporter_registry_HPX_COMPONENT_NAME_hello_world_worker_action()':
hello_world.cpp:(.text+0x1276): undefined reference to `hpx_exported_plugins_list_HPX_COMPONENT_NAME_registry'               
CMakeFiles/hello_world_exe.dir/hello_world.cpp.o: In function `(anonymous namespace)::hpx_plugin_exporter_factory_HPX_COMPONENT_NAME_hello_world_worker_action::hpx_plugin_exporter_factory_HPX_COMPONENT_NAME_hello_world_worker_action()':
hello_world.cpp:(.text+0x13f6): undefined reference to `hpx_exported_plugins_list_HPX_COMPONENT_NAME_factory'               
CMakeFiles/hello_world_exe.dir/hello_world.cpp.o: In function `_GLOBAL__sub_I_hello_world.cpp':
hello_world.cpp:(.text.startup+0x30f): undefined reference to `hpx_exported_plugins_list_HPX_COMPONENT_NAME_registry'        
collect2: error: ld returned 1 exit status
make[3]: *** [bin/hello_world] Error 1
make[3]: Target `examples/quickstart/CMakeFiles/hello_world_exe.dir/build' not remade because of errors.
make[2]: *** [examples/quickstart/CMakeFiles/hello_world_exe.dir/all] Error 2
@hkaiser

This comment has been minimized.

Copy link
Member

commented Feb 11, 2013

Jeremiah, thanks for reporting this, we're aware of this issue (whic I introduced yesterday while trying to catch wrong usage of certain macros as you did). I'm working on finding a compromise.

@jewillco

This comment has been minimized.

Copy link
Author

commented Feb 11, 2013

When I define HPX_COMPONENT_NAME in my code and add the call to HPX_REGISTER_COMPONENT_MODULE(); back in, it links but I get seg faults at run-time (in cp-demangle.c).

@hkaiser

This comment has been minimized.

Copy link
Member

commented Feb 11, 2013

You should never need to use HPX_REGISTER_COMPONENT_MODULE(); in an executable.

@jewillco

This comment has been minimized.

Copy link
Author

commented Feb 11, 2013

Adding it and defining HPX_COMPONENT_NAME seems to be what makes the executables link; removing it causes linker errors from missing symbols.

@ghost ghost assigned hkaiser Feb 12, 2013

hkaiser added a commit that referenced this issue Feb 12, 2013

Partially reverting 337639b, trying different solution. Additionally,…
… this is a fix for #707: Many examples do not link with Git HEAD version
@hkaiser

This comment has been minimized.

Copy link
Member

commented Feb 12, 2013

That's fixed by 5f71a10

@hkaiser hkaiser closed this Feb 12, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.