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 on cygwin #905

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Build on cygwin #905

wants to merge 1 commit into from

Conversation

fd00
Copy link

@fd00 fd00 commented May 30, 2024

$ uname -srvmpio
CYGWIN_NT-10.0-22000 3.5.3-1.x86_64 2024-04-03 17:25 UTC x86_64 unknown unknown Cygwin
$ cd /tmp
$ git clone https://github.com/microsoft/mimalloc.git
$ cd mimalloc
$ cmake -DMI_BUILD_STATIC:BOOL=OFF -DMI_BUILD_OBJECT:BOOL=OFF -DMI_INSTALL_TOPLEVEL:BOOL=ON .
$ make VERBOSE=1
:
[  4%] Linking C shared library cygmimalloc-1.dll
/usr/bin/cmake.exe -E cmake_link_script CMakeFiles/mimalloc.dir/link.txt --verbose=1
/usr/bin/cc -O3 -DNDEBUG -shared -Wl,--enable-auto-import -o cygmimalloc-1.dll -Wl,--out-implib,libmimalloc.dll.a -Wl,--major-image-version,1,--minor-image-version,8 CMakeFiles/mimalloc.dir/src/alloc.c.o "CMakeFiles/mimalloc.dir/src/alloc-aligned.c.o" "CMakeFiles/mimalloc.dir/src/alloc-posix.c.o" CMakeFiles/mimalloc.dir/src/arena.c.o CMakeFiles/mimalloc.dir/src/bitmap.c.o CMakeFiles/mimalloc.dir/src/heap.c.o CMakeFiles/mimalloc.dir/src/init.c.o CMakeFiles/mimalloc.dir/src/libc.c.o CMakeFiles/mimalloc.dir/src/options.c.o CMakeFiles/mimalloc.dir/src/os.c.o CMakeFiles/mimalloc.dir/src/page.c.o CMakeFiles/mimalloc.dir/src/random.c.o CMakeFiles/mimalloc.dir/src/segment.c.o "CMakeFiles/mimalloc.dir/src/segment-map.c.o" CMakeFiles/mimalloc.dir/src/stats.c.o CMakeFiles/mimalloc.dir/src/prim/prim.c.o  -lpthread -lrt -latomic
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: CMakeFiles/mimalloc.dir/src/alloc.c.o:alloc.c:(.text+0x219): undefined reference to `__builtin_thread_pointer'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: CMakeFiles/mimalloc.dir/src/alloc.c.o:alloc.c:(.text+0x3d9): undefined reference to `__builtin_thread_pointer'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: CMakeFiles/mimalloc.dir/src/alloc.c.o:alloc.c:(.text+0x499): undefined reference to `__builtin_thread_pointer'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: CMakeFiles/mimalloc.dir/src/alloc.c.o:alloc.c:(.text+0x559): undefined reference to `__builtin_thread_pointer'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: CMakeFiles/mimalloc.dir/src/alloc.c.o:alloc.c:(.text+0x619): undefined reference to `__builtin_thread_pointer'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: CMakeFiles/mimalloc.dir/src/alloc.c.o:alloc.c:(.text+0x6d9): more undefined references to `__builtin_thread_pointer' follow
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/mimalloc.dir/build.make:337: cygmimalloc-1.dll] Error 1
make[2]: Leaving directory '/tmp/mimalloc'
make[1]: *** [CMakeFiles/Makefile2:89: CMakeFiles/mimalloc.dir/all] Error 2
make[1]: Leaving directory '/tmp/mimalloc'
make: *** [Makefile:146: all] Error 2

After this modification, all tests passed.

$ make VERBOSE=1 test
Running tests...
/usr/bin/ctest.exe --force-new-ctest-process
Test project /tmp/mimalloc
    Start 1: test-api
1/3 Test #1: test-api .........................   Passed    2.58 sec
    Start 2: test-api-fill
2/3 Test #2: test-api-fill ....................   Passed    0.06 sec
    Start 3: test-stress
3/3 Test #3: test-stress ......................   Passed    3.63 sec

100% tests passed, 0 tests failed out of 3

Total Test time (real) =   6.27 sec

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

Successfully merging this pull request may close these issues.

1 participant