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
Closed

Many examples do not link with Git HEAD version #707

jewillco opened this issue Feb 11, 2013 · 5 comments

Comments

@jewillco
Copy link

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
Copy link
Member

hkaiser 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
Copy link
Author

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
Copy link
Member

hkaiser commented Feb 11, 2013

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

@jewillco
Copy link
Author

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
… this is a fix for #707: Many examples do not link with Git HEAD version
@hkaiser
Copy link
Member

hkaiser commented Feb 12, 2013

That's fixed by 5f71a10

@hkaiser hkaiser closed this as completed Feb 12, 2013
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