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

Unable to build in freebsd. #910

Closed
ooxxao opened this issue Jun 7, 2016 · 4 comments
Closed

Unable to build in freebsd. #910

ooxxao opened this issue Jun 7, 2016 · 4 comments

Comments

@ooxxao
Copy link

ooxxao commented Jun 7, 2016

I'm using freebsd machine 10.3-RELEASE, i386, clang version 3.4.1, and cmake version 3.3.1.

I got these message after cmake . .

-- The C compiler identification is Clang 3.4.1
-- The CXX compiler identification is Clang 3.4.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/CC
-- Check for working CXX compiler: /usr/bin/CC -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.28")
-- Looking for ZLIB...
-- checking for module 'zzip-zlib-config'
-- package 'zzip-zlib-config' not found
-- Found ZLIB: optimized;/usr/lib/libz.so;debug;/usr/lib/libz.so
-- checking for module 'minizip'
-- package 'minizip' not found
-- Enabled formats: 3DS AC ASE ASSBIN ASSXML B3D BVH COLLADA DXF CSM HMP IRRMESH IRR LWO LWS MD2 MD3 MD5 MDC MDL NFF NDO OFF OBJ OGRE OPENGEX PLY MS3D COB BLEND IFC XGL FBX Q3D Q3BSP RAW SIB SMD STL TERRAGEN 3D X GLTF 3MF
-- Disabled formats:
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Git: /usr/local/bin/git (found version "2.6.3")
-- Configuring done
-- Generating done
-- Build files have been written to: ......./assimp-master

It looks like done well. But when start make, it fails with reinterpret_cast error.

  anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]

/assimp-master/code/BlenderTessellator.cpp:382:32: error:
reinterpret_cast from 'nullptr_t' to 'Assimp::Blender::PointP2T ' is not allowed
unsigned int pointOffset = OffsetOf( PointP2T, point2D );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/assimp-master/code/BlenderTessellator.cpp:377:35: note: expanded from
macro 'OffsetOf'
reinterpret_cast<uint8_t
>(&( reinterpret_cast< Class* >( NULL )->( &Class::Member ) )) -
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 warnings and 1 error generated.
*
* Error code 1

Stop.
make[2]: stopped in /assimp-master
*** Error code 1

Stop.
make[1]: stopped in /assimp-master
*** Error code 1

Stop.
make: stopped in /assimp-master

Is it a version problem or a compiler problem? What should I do in this situation?

@kimkulling
Copy link
Member

Out travis service is using clang 3.4 but this error does not occur. Crazy.

@ooxxao
Copy link
Author

ooxxao commented Jun 10, 2016

I used another version 3.1.1. That's just fine. Thanks.

@kimkulling
Copy link
Member

Ok, thanks for the update. I will close this issue.

@turol
Copy link
Member

turol commented Jun 10, 2016

Looks like this might be caused by a nonstandard OffsetOf macro. It casts a nullptr to a real type and references it. This is not allowed. Just replace it with standard compiler-provided offsetof and see if that works.

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

No branches or pull requests

3 participants