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

Test failure on 32 bit platforms #56

Closed
tomhughes opened this issue Dec 6, 2014 · 4 comments
Closed

Test failure on 32 bit platforms #56

tomhughes opened this issue Dec 6, 2014 · 4 comments
Labels

Comments

@tomhughes
Copy link
Contributor

A number of the tests fail on a 32 bit platform with errors like this:

c++ -I../include -Iinclude -g -std=c++11 -Werror -Wall -Wextra -pedantic -Wredundant-decls -Wdisabled-optimization -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wold-style-cast -o tests test_main.o t/basic/test_changeset.cpp
--------------------------
In file included from ../include/osmium/memory/collection.hpp:40:0,
                 from ../include/osmium/osm/changeset.hpp:39,
                 from t/basic/test_changeset.cpp:3:
../include/osmium/memory/item.hpp: In function 'osmium::memory::item_size_type osmium::memory::padded_length(osmium::memory::item_size_type)':
../include/osmium/memory/item.hpp:59:31: error: redefinition of 'osmium::memory::item_size_type osmium::memory::padded_length(osmium::memory::item_size_type)'
         inline item_size_type padded_length(item_size_type length) noexcept {
                               ^
../include/osmium/memory/item.hpp:55:23: error: 'size_t osmium::memory::padded_length(size_t)' previously defined here
         inline size_t padded_length(size_t length) noexcept {
                       ^

The problem is that on a 32 bit platform size_t is uint32_t and therefore the same as item_size_type and we wind up with duplicate function definitions.

@springmeyer
Copy link

Is 32 bit an important platform to run osmium on?

@tomhughes
Copy link
Contributor Author

Well that's a reasonable question, but my problem is that I was considering packaging it for Fedora and 32 bit x86 and ARM are both primary architectures so any package would be expected to build there.

I could of course just not run the tests but that would probably only defer the problem until I tried to package something like osmium-tool or node-osmium that builds on top of libosmium.

@joto joto added the bug label Dec 6, 2014
joto added a commit that referenced this issue Dec 12, 2014
On 32 bit systems item_size_type and size_t are the same size, so there was a
duplicate definition here. See also #56.
@joto joto mentioned this issue Jan 9, 2015
@joto
Copy link
Member

joto commented Feb 10, 2015

Compiling on 32bit should work now. @tomhughes can you verify?

@tomhughes
Copy link
Contributor Author

Confirmed fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants