Bug 1133301 - clang + boost: __extern_always_inline error messages
Summary: clang + boost: __extern_always_inline error messages
Keywords:
Status: CLOSED DUPLICATE of bug 1133508
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Carlos O'Donell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-24 13:08 UTC by Stefan Schweter
Modified: 2016-11-24 12:18 UTC (History)
19 users (show)

Fixed In Version:
Clone Of:
Environment:
clang version 3.4.2 (tags/RELEASE_34/dot2-final) Target: x86_64-redhat-linux-gnu Thread model: posix
Last Closed: 2015-03-11 10:48:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Stefan Schweter 2014-08-24 13:08:07 UTC
Description of problem:

When using clang 3.4.2 and boost, I got many "__extern_always_inline" error messages. 

Notice: These error messages won't appear when using e.g Arch Linux with clang 3.4.2 and Boost 1.55 or Debian Debian Testing with the same boost and clang version.


Version-Release number of selected component (if applicable):

Fedora 21
clang 3.4.2
Boost 1.55

How reproducible:

Here's short example code:

#include <boost/archive/binary_oarchive.hpp>
#include <boost/archive/binary_iarchive.hpp>

#include <string>
#include <fstream>

class test_me
{
public:
	friend class boost::serialization::access;
	test_me(){}

	template <typename Archive> void load(Archive &ar)
	{
	}

	void load(std::string file_name);
};

void test_me::load(std::string file_name)
{
	std::ifstream input_fs(file_name.c_str());
	boost::archive::binary_iarchive ia(input_fs);

	load(ia);
}

int main()
{
	test_me * test = new test_me();
	test->load("test.out");
	return 0;
}


Steps to Reproduce:
1. Compile the code with clang++ -Wunreachable-code -std=c++11 -O3 -lboost_serialization  test.cpp
2.
3.

Actual results:

In file included from test.cpp:2:
In file included from /usr/include/boost/archive/binary_iarchive.hpp:20:
In file included from /usr/include/boost/archive/binary_iarchive_impl.hpp:21:
In file included from /usr/include/boost/archive/basic_binary_iprimitive.hpp:33:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.9.1/../../../../include/c++/4.9.1/cstring:42:
/usr/include/string.h:82:1: error: unknown type name '__extern_always_inline'
__extern_always_inline void *

Expected results:

No error messages.

Additional info:

I can fix that manually with adding -D__extern_always_inline=inline as additional clang parameter. But the code mentioned above is working on Arch Linux + Debian Testing, so I guess it must be somethig redhat-special?

Thanks many in advance! If you need additional information please let me know!

Regards,

Stefan

Comment 1 Peter Robinson 2014-09-01 17:29:42 UTC
It's not just with boost, when building the latest libclc with llvm/clang I see the same issue.

Comment 2 Jan Včelák 2014-12-26 01:47:02 UTC
Note: Not an issue on F21 (clang-3.5.0-4.fc21.x86_64)

Comment 3 Petr Machata 2015-01-01 21:36:05 UTC
Seems like a glibc issue?
https://sourceware.org/ml/libc-alpha/2014-09/msg00375.html

Comment 4 Siddhesh Poyarekar 2015-03-11 10:48:50 UTC
Yes, was bug 1133508 that I fixed in F21.

*** This bug has been marked as a duplicate of bug 1133508 ***


Note You need to log in before you can comment on or make changes to this bug.