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

Build issue -- argument value outside of valid range #2114

Closed
collenjones opened this issue Feb 18, 2019 · 5 comments

Comments

@collenjones
Copy link

commented Feb 18, 2019

OS: macOS 10.14.2
Compiler: Clang 7.0.1

I'm still relatively new to C++ so it's likely I'm doing something dumb but I'm getting the following error when I run ./build_cmake_pybullet_double.sh:

/Users/collen/Dev/Language/C++/bullet3/src/Bullet3Common/b3Vector3.h:290:7: error: argument value 10880 is outside the valid range [0, 255]
      [-Wargument-outside-range]

Any ideas how to fix this?

Full Trace

$ ./build_cmake_pybullet_double.sh
-- The C compiler identification is Clang 7.0.1
-- The CXX compiler identification is Clang 7.0.1
-- Check for working C compiler: /usr/local/opt/llvm/bin/clang
-- Check for working C compiler: /usr/local/opt/llvm/bin/clang -- 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/local/opt/llvm/bin/clang++
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Apple
-- Found OpenGL: /System/Library/Frameworks/OpenGL.framework
OPENGL FOUND
/System/Library/Frameworks/OpenGL.framework/System/Library/Frameworks/OpenGL.framework
-- Found PythonInterp: /usr/local/bin/python3 (found version "3.7.2")
-- Looking for versions: 3.7.2;3.7
-- Looking for python version '3.7.2' by checking executables: /usr/local/bin/python3;python;python3;python3.7.
-- Found executable /usr/local/bin/python3 with suitable version 3.7.2
-- Found PythonLibs: /usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib (found suitable exact version "3.7.2")
-- Found PythonLibs: /usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib (found version "3.7.2")
-- Found NumPy: /usr/local/lib/python3.7/site-packages/numpy/core/include (found version "1.16.1")
-- NumPy ver. 1.16.1 found (include: /usr/local/lib/python3.7/site-packages/numpy/core/include)
NumPy found
Mac OSX Version is 10.14
/System/Library/Frameworks/Cocoa.framework
/System/Library/Frameworks/Cocoa.framework
/System/Library/Frameworks/Cocoa.framework
/System/Library/Frameworks/Cocoa.framework
CL64
/System/Library/Frameworks/Cocoa.framework
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    BT_USE_EGL


-- Build files have been written to: /Users/collen/Dev/Language/C++/bullet3/build_cmake
Scanning dependencies of target Bullet3Common
Scanning dependencies of target BussIK
Scanning dependencies of target clsocket
Scanning dependencies of target gtest
Scanning dependencies of target HACD
Scanning dependencies of target LinearMath
Scanning dependencies of target gwen
[  0%] Building CXX object examples/ThirdPartyLibs/clsocket/CMakeFiles/clsocket.dir/src/SimpleSocket.o
[  0%] Building CXX object Extras/HACD/CMakeFiles/HACD.dir/hacdGraph.o
[  1%] Building CXX object examples/ThirdPartyLibs/clsocket/CMakeFiles/clsocket.dir/src/ActiveSocket.o
[  1%] Building CXX object src/Bullet3Common/CMakeFiles/Bullet3Common.dir/b3AlignedAllocator.o
[  1%] Building CXX object examples/ThirdPartyLibs/BussIK/CMakeFiles/BussIK.dir/Jacobian.o
[  1%] Building CXX object src/LinearMath/CMakeFiles/LinearMath.dir/btAlignedAllocator.o
[  1%] Building CXX object test/gtest-1.7.0/CMakeFiles/gtest.dir/src/gtest-all.o
[  1%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Anim.o
[  1%] Building CXX object src/LinearMath/CMakeFiles/LinearMath.dir/btConvexHull.o
[  1%] Building CXX object Extras/HACD/CMakeFiles/HACD.dir/hacdHACD.o
[  1%] Building CXX object src/Bullet3Common/CMakeFiles/Bullet3Common.dir/b3Vector3.o
[  1%] Building CXX object examples/ThirdPartyLibs/clsocket/CMakeFiles/clsocket.dir/src/PassiveSocket.o
In file included from /Users/collen/Dev/Language/C++/bullet3/src/Bullet3Common/b3Vector3.cpp:21:
/Users/collen/Dev/Language/C++/bullet3/src/Bullet3Common/b3Vector3.h:290:7: error: argument value 10880 is outside the valid range [0, 255]
      [-Wargument-outside-range]
                y = b3_splat_ps(y, 0x80);
                    ^~~~~~~~~~~~~~~~~~~~
/Users/collen/Dev/Language/C++/bullet3/src/Bullet3Common/b3Vector3.h:43:29: note: expanded from macro 'b3_splat_ps'
#define b3_splat_ps(_a, _i) b3_pshufd_ps((_a), B3_SHUFFLE(_i, _i, _i, _i))
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/collen/Dev/Language/C++/bullet3/src/Bullet3Common/b3Vector3.h:41:33: note: expanded from macro 'b3_pshufd_ps'
#define b3_pshufd_ps(_a, _mask) _mm_shuffle_ps((_a), (_a), (_mask))
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/llvm/7.0.1/lib/clang/7.0.1/include/xmmintrin.h:2608:11: note: expanded from macro '_mm_shuffle_ps'
  (__m128)__builtin_ia32_shufps((__v4sf)(__m128)(a), (__v4sf)(__m128)(b), \
          ^
1 error generated.
make[2]: *** [src/Bullet3Common/CMakeFiles/Bullet3Common.dir/b3Vector3.o] Error 1
make[1]: *** [src/Bullet3Common/CMakeFiles/Bullet3Common.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  1%] Building CXX object examples/ThirdPartyLibs/BussIK/CMakeFiles/BussIK.dir/LinearR2.o
[  1%] Linking CXX static library libclsocket.a
[  1%] Built target clsocket
[  1%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/BaseRender.o
[  1%] Building CXX object src/LinearMath/CMakeFiles/LinearMath.dir/btConvexHullComputer.o
[  1%] Building CXX object examples/ThirdPartyLibs/BussIK/CMakeFiles/BussIK.dir/LinearR3.o
[  1%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/Base.o
[  2%] Building CXX object Extras/HACD/CMakeFiles/HACD.dir/hacdICHull.o
[  2%] Building CXX object src/LinearMath/CMakeFiles/LinearMath.dir/btGeometryUtil.o
[  2%] Building CXX object Extras/HACD/CMakeFiles/HACD.dir/hacdManifoldMesh.o
[  2%] Building CXX object examples/ThirdPartyLibs/BussIK/CMakeFiles/BussIK.dir/LinearR4.o
[  2%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/Button.o
[  2%] Building CXX object src/LinearMath/CMakeFiles/LinearMath.dir/btPolarDecomposition.o
[  2%] Building CXX object examples/ThirdPartyLibs/BussIK/CMakeFiles/BussIK.dir/MatrixRmn.o
[  2%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/Canvas.o
[  2%] Building CXX object src/LinearMath/CMakeFiles/LinearMath.dir/btQuickprof.o
[  2%] Building CXX object src/LinearMath/CMakeFiles/LinearMath.dir/btSerializer.o
[  2%] Building CXX object examples/ThirdPartyLibs/BussIK/CMakeFiles/BussIK.dir/Misc.o
[  3%] Building CXX object src/LinearMath/CMakeFiles/LinearMath.dir/btSerializer64.o
[  4%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/CheckBox.o
[  4%] Building CXX object src/LinearMath/CMakeFiles/LinearMath.dir/btThreads.o
[  4%] Building CXX object examples/ThirdPartyLibs/BussIK/CMakeFiles/BussIK.dir/Node.o
[  4%] Linking CXX shared library libHACD.dylib
[  4%] Built target HACD
[  4%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/ColorControls.o
[  4%] Building CXX object src/LinearMath/CMakeFiles/LinearMath.dir/btVector3.o
[  4%] Building CXX object src/LinearMath/CMakeFiles/LinearMath.dir/TaskScheduler/btTaskScheduler.o
[  4%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/ColorPicker.o
[  4%] Building CXX object src/LinearMath/CMakeFiles/LinearMath.dir/TaskScheduler/btThreadSupportPosix.o
[  4%] Building CXX object src/LinearMath/CMakeFiles/LinearMath.dir/TaskScheduler/btThreadSupportWin32.o
[  4%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/ComboBox.o
[  4%] Linking CXX shared library libLinearMath.dylib
[  4%] Built target LinearMath
[  4%] Building CXX object examples/ThirdPartyLibs/BussIK/CMakeFiles/BussIK.dir/Tree.o
[  5%] Building CXX object examples/ThirdPartyLibs/BussIK/CMakeFiles/BussIK.dir/VectorRn.o
[  5%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/Dialog/FileOpen.o
[  5%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/CrossSplitter.o
[  5%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/Dialog/FileSave.o
[  5%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/Dialog/Query.o
[  5%] Linking CXX shared library libBussIK.dylib
[  5%] Built target BussIK
[  5%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/DockBase.o
[  5%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/DockedTabControl.o
[  6%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/Dragger.o
[  6%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/GroupBox.o
[  6%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/HSVColorPicker.o
[  6%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/HorizontalScrollBar.o
[  6%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/HorizontalSlider.o
[  6%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/ImagePanel.o
[  6%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/Label.o
[  6%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/LabelClickable.o
[  6%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/ListBox.o
[  6%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/Menu.o
[  6%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/MenuItem.o
[  7%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/MenuStrip.o
[  7%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/NumericUpDown.o
[  7%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/PanelListPanel.o
[  7%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/ProgressBar.o
[  7%] Linking CXX shared library libgtest.dylib
[  7%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/Properties.o
[  7%] Built target gtest
[  7%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/RadioButton.o
[  7%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/RadioButtonController.o
[  7%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/ResizableControl.o
[  7%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/Resizer.o
[  7%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/RichLabel.o
[  8%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/ScrollBar.o
[  8%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/ScrollBarBar.o
[  8%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/ScrollBarButton.o
[  8%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/ScrollControl.o
[  8%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/Slider.o
[  8%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/SplitterBar.o
[  8%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/TabButton.o
[  8%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/TabControl.o
[  8%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/TabStrip.o
[  8%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/Text.o
[  9%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/TextBox.o
[  9%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/TextBoxNumeric.o
[  9%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/TreeControl.o
[  9%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/TreeNode.o
[  9%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/VerticalScrollBar.o
[  9%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/VerticalSlider.o
[  9%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Controls/WindowControl.o
[  9%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/DragAndDrop.o
[  9%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Gwen.o
[  9%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Hook.o
[  9%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Platforms/Windows.o
[ 10%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Platforms/Null.o
[ 10%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Renderers/OpenGL_DebugFont.o
[ 10%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Skin.o
[ 10%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/ToolTip.o
[ 10%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/Utility.o
[ 10%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/events.o
[ 10%] Building CXX object examples/ThirdPartyLibs/Gwen/CMakeFiles/gwen.dir/inputhandler.o
[ 10%] Linking CXX shared library libgwen.dylib
ld: warning: text-based stub file /System/Library/Frameworks//OpenGL.framework/OpenGL.tbd and library file /System/Library/Frameworks//OpenGL.framework/OpenGL are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.tbd and library file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.tbd and library file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib are out of sync. Falling back to library file for linking.
[ 10%] Built target gwen
make: *** [all] Error 2
@jamesdolan

This comment has been minimized.

Copy link

commented Mar 30, 2019

Looks like the warning is new when apple updated clang. This should fix it though...
#define BT_SHUFFLE(x, y, z, w) (((w) << 6 | (z) << 4 | (y) << 2 | (x)) & 0xff)

@collenjones

This comment has been minimized.

Copy link
Author

commented May 1, 2019

Thanks, @jamesdolan! This appears to have been fixed so closing.

@collenjones collenjones closed this May 1, 2019

@erwincoumans

This comment has been minimized.

Copy link
Member

commented May 1, 2019

We don't need to fix this on the Bullet source code?

@EmilNorden

This comment has been minimized.

Copy link
Contributor

commented May 4, 2019

We don't need to fix this on the Bullet source code?

I've created a small pull request for this issue: #2232

@erwincoumans

This comment has been minimized.

Copy link
Member

commented May 5, 2019

Thanks a lot for the help everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.