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

undefined reference to `btAlignedAllocInternal(unsigned long, int) #86

Open
kevinsmia1939 opened this issue Jul 24, 2023 · 0 comments
Open

Comments

@kevinsmia1939
Copy link
Contributor

kevinsmia1939 commented Jul 24, 2023

Hi,
I am experimenting with packaging BRL-CAD as Flatpak for Linux on openSUSE Tumbleweed.
I encounter the error when building with Bullet enabled.

cmake version 3.26.4
gcc (SUSE Linux) 13.1.1 20230710 [revision f9781fcf733ca3afe5b5811afd8ecbb18d9d3a11]

Bullet 3.25

      - -DBUILD_UNIT_TESTS:BOOL=OFF
      - -DBUILD_EXTRAS:BOOL=ON
      - -DBUILD_SHARED_LIBS:BOOL=ON
      - -DINSTALL_EXTRA_LIBS:BOOL=ON
      - -DINSTALL_LIBS:BOOL=ON

BRL-CAD commit : commit: fda0db5

-------------------- BRL-CAD Release 7.34.3, Build 20230725 --------------------

        Prefix: /app
      Binaries: /app/bin
     Libraries: /app/lib
  Manual pages: /app/share/man
Data resources: /app/share
 
CC       = /usr/bin/cc
CXX      = /usr/bin/c++
CFLAGS   = -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
           -fexceptions -fstack-protector-strong -grecord-gcc-switches
           -fasynchronous-unwind-tables -fstack-clash-protection
           -fcf-protection -fno-omit-frame-pointer -Wno-error=stringop-overflow
           -Wno-error=format-truncation -Wno-error=inline
           -Wno-error=format-overflow -Wno-error=dangling-pointer
           -Wno-error=array-bounds -Wno-error=nonnull
           -Wno-error=maybe-uninitialized -std=c11 -D_POSIX_C_SOURCE=200809L
           -D_XOPEN_SOURCE=700 -pipe -fvisibility=hidden -fno-strict-aliasing
           -fno-common -fexceptions -m64 -g -ggdb3 -fstack-protector-all
           -pedantic -pedantic-errors -Wall -Wextra -Wundef -Wfloat-equal
           -Wshadow -Wbad-function-cast -Wc++-compat -Winline -Wno-long-long
           -Wno-variadic-macros -Werror
CXXFLAGS = -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
           -fexceptions -fstack-protector-strong -grecord-gcc-switches
           -fasynchronous-unwind-tables -fstack-clash-protection
           -fcf-protection -fno-omit-frame-pointer -Wno-error=stringop-overflow
           -Wno-error=format-truncation -Wno-error=inline
           -Wno-error=format-overflow -Wno-error=dangling-pointer
           -Wno-error=array-bounds -Wno-error=nonnull
           -Wno-error=maybe-uninitialized -std=c++14 -D_POSIX_C_SOURCE=200809L
           -D_XOPEN_SOURCE=700 -pipe -fvisibility=hidden -fno-strict-aliasing
           -fno-common -fexceptions -ftemplate-depth-128 -m64 -g -ggdb3
           -fstack-protector-all -pedantic -Wall -Wextra -Wundef -Wfloat-equal
           -Wshadow -Wno-inline -Wno-long-long -Wno-variadic-macros -Werror
LDFLAGS  = -L/app/lib -Wl,-z,relro,-z,now -Wl,--as-needed -m64 -g -ggdb3
 
Compile Tcl ........................: ON
Compile Tk .........................: ON
Compile Itcl/Itk ...................: ON
Compile Iwidgets ...................: ON
Compile libpng .....................: ON
Compile libregex ...................: ON
Compile zlib .......................: ON
Compile STEPcode....................: ON
 
OpenGL support (optional) ..........: ON
X11 support (optional) .............: ON
Qt support (optional) ..............: ON
Run-time debuggability (optional) ..: ON
 
Build 32/64-bit release ............: 64BIT (Auto)
Build with optimization ............: OFF
Build static libraries .............: OFF
Build dynamic libraries ............: ON
Install example geometry models ....: ON
Generate extra docs ................: OFF
[ 83%] Built target ged-zap
[ 83%] Building C object src/libtclcad/CMakeFiles/libtclcad-obj.dir/auto_path.c.o
[ 83%] Building C object src/libtclcad/CMakeFiles/libtclcad-obj.dir/bn.c.o
[ 83%] Linking CXX executable simulate_test
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: CMakeFiles/simulate_test.dir/simulate_test.cpp.o: in function `btDefaultSerializer::internalAlloc(unsigned long)':
/app/include/bullet/LinearMath/btSerializer.h:600: undefined reference to `btAlignedAllocInternal(unsigned long, int)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: CMakeFiles/simulate_test.dir/simulate_test.cpp.o: in function `btAlignedAllocator<int, 16u>::deallocate(int*)':
/app/include/bullet/LinearMath/btAlignedAllocator.h:97: undefined reference to `btAlignedFreeInternal(void*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/include/bullet/LinearMath/btAlignedAllocator.h:97: undefined reference to `btAlignedFreeInternal(void*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: CMakeFiles/simulate_test.dir/simulate_test.cpp.o: in function `btAlignedAllocator<btTriangleInfo, 16u>::deallocate(btTriangleInfo*)':
/app/include/bullet/LinearMath/btAlignedAllocator.h:97: undefined reference to `btAlignedFreeInternal(void*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: CMakeFiles/simulate_test.dir/simulate_test.cpp.o: in function `btAlignedAllocator<btHashInt, 16u>::deallocate(btHashInt*)':
/app/include/bullet/LinearMath/btAlignedAllocator.h:97: undefined reference to `btAlignedFreeInternal(void*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: CMakeFiles/simulate_test.dir/simulate_test.cpp.o: in function `btAlignedAllocator<int, 16u>::deallocate(int*)':
/app/include/bullet/LinearMath/btAlignedAllocator.h:97: undefined reference to `btAlignedFreeInternal(void*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: CMakeFiles/simulate_test.dir/simulate_test.cpp.o:/app/include/bullet/LinearMath/btAlignedAllocator.h:97: more undefined references to `btAlignedFreeInternal(void*)' follow
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: CMakeFiles/simulate_test.dir/simulate_test.cpp.o: in function `btAlignedAllocator<btChunk*, 16u>::allocate(int, btChunk* const**)':
/app/include/bullet/LinearMath/btAlignedAllocator.h:92: undefined reference to `btAlignedAllocInternal(unsigned long, int)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: CMakeFiles/simulate_test.dir/simulate_test.cpp.o: in function `btDefaultSerializer::internalAlloc(unsigned long)':
/app/include/bullet/LinearMath/btSerializer.h:600: undefined reference to `btAlignedAllocInternal(unsigned long, int)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: CMakeFiles/simulate_test.dir/simulate_test.cpp.o: in function `btAlignedAllocator<btChunk*, 16u>::deallocate(btChunk**)':
/app/include/bullet/LinearMath/btAlignedAllocator.h:97: undefined reference to `btAlignedFreeInternal(void*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: CMakeFiles/simulate_test.dir/simulate_test.cpp.o: in function `btAlignedAllocator<btChunk*, 16u>::allocate(int, btChunk* const**)':
/app/include/bullet/LinearMath/btAlignedAllocator.h:92: undefined reference to `btAlignedAllocInternal(unsigned long, int)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/include/bullet/LinearMath/btAlignedAllocator.h:92: undefined reference to `btAlignedAllocInternal(unsigned long, int)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/include/bullet/LinearMath/btAlignedAllocator.h:92: undefined reference to `btAlignedAllocInternal(unsigned long, int)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/include/bullet/LinearMath/btAlignedAllocator.h:92: undefined reference to `btAlignedAllocInternal(unsigned long, int)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: CMakeFiles/simulate_test.dir/simulate_test.cpp.o: in function `btDefaultSerializer::internalAlloc(unsigned long)':
/app/include/bullet/LinearMath/btSerializer.h:600: undefined reference to `btAlignedAllocInternal(unsigned long, int)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: CMakeFiles/simulate_test.dir/simulate_test.cpp.o:/app/include/bullet/LinearMath/btSerializer.h:600: more undefined references to `btAlignedAllocInternal(unsigned long, int)' follow
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: CMakeFiles/simulate_test.dir/simulate_test.cpp.o: in function `btAlignedAllocator<btChunk*, 16u>::deallocate(btChunk**)':
/app/include/bullet/LinearMath/btAlignedAllocator.h:97: undefined reference to `btAlignedFreeInternal(void*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/include/bullet/LinearMath/btAlignedAllocator.h:97: undefined reference to `btAlignedFreeInternal(void*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/include/bullet/LinearMath/btAlignedAllocator.h:97: undefined reference to `btAlignedFreeInternal(void*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/include/bullet/LinearMath/btAlignedAllocator.h:97: undefined reference to `btAlignedFreeInternal(void*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: CMakeFiles/simulate_test.dir/simulate_test.cpp.o:(.data.rel.ro._ZTV17btTypedConstraint[_ZTV17btTypedConstraint]+0x60): undefined reference to `btTypedConstraint::serialize(void*, btSerializer*) const'
collect2: error: ld returned 1 exit status
make[2]: *** [src/libged/simulate/tests/CMakeFiles/simulate_test.dir/build.make:118: src/libged/simulate/tests/simulate_test] Error 1
make[1]: *** [CMakeFiles/Makefile2:19542: src/libged/simulate/tests/CMakeFiles/simulate_test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

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

1 participant