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

Warning while compiling hpx #2109

Closed
justwagle opened this issue Apr 22, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@justwagle
Copy link
Member

commented Apr 22, 2016

While compiling the latest master branch of hpx, invalid attribute warnings are shown.
The full log of the compilation is linked below.

https://gist.github.com/justwagle/c1a16b6d2dc5bacc8924396bb96bf562

@K-ballo

This comment has been minimized.

Copy link
Member

commented Apr 22, 2016

This is a side-effect of the deprecation of hpx_fwd.hpp. Presumably those forward declarations mentioned in the warnings are seen by the compiler after the class was already defined (with the correct export attribute).

@W4RH4WK

This comment has been minimized.

Copy link
Contributor

commented Dec 19, 2016

I encountered a similar issue recently where the thread class is already defined.

Brief Output:

In file included from hpx/hpx/runtime_fwd.hpp:26:0,
                 from hpx/hpx/runtime/applier/apply_helper.hpp:12,
                 from hpx/hpx/runtime/actions/transfer_action.hpp:18,
                 from hpx/hpx/runtime/actions/basic_action.hpp:16,
                 from hpx/hpx/lcos/base_lco.hpp:10,
                 from hpx/hpx/lcos/base_lco_with_value.hpp:10,
                 from hpx/hpx/lcos/detail/promise_lco.hpp:11,
                 from hpx/hpx/lcos/detail/promise_base.hpp:13,
                 from hpx/hpx/lcos/promise.hpp:12,
                 from hpx/hpx/lcos/packaged_action.hpp:11,
                 from hpx/hpx/lcos/detail/async_implementations.hpp:11,
                 from hpx/hpx/lcos/async.hpp:11,
                 from hpx/hpx/async.hpp:10,
                 from hpx/hpx/parallel/executors/executor_information_traits.hpp:12,
                 from hpx/hpx/parallel/executors/static_chunk_size.hpp:13,
                 from hpx/hpx/parallel/executors/service_executors.hpp:13,
                 from hpx/hpx/runtime/threads/run_as_os_thread.hpp:10,
                 from hpx/hpx/include/threads.hpp:15,
                 from test.cpp:5:
hpx/hpx/runtime/runtime_fwd.hpp: At global scope:
hpx/hpx/runtime/runtime_fwd.hpp:16:26: error: type attributes ignored after type is already defined [-Werror=attributes]
     class HPX_API_EXPORT thread;
                          ^

Full Output:
https://gist.github.com/W4RH4WK/abf89baf6e03a9c0ba0f6cba170680f9

Minimum Example:

#include <hpx/include/serialization.hpp>
#include <hpx/runtime/serialization/list.hpp>
#include <hpx/include/threads.hpp>

#include <iostream>

int main(void) {
        std::cout << "Hello World" << std::endl;
        return 0;
}

Currently on:
b603449

@hkaiser

This comment has been minimized.

Copy link
Member

commented Dec 19, 2016

@W4RH4WK Thanks for this report. This should be fixed by merging #2429.

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.