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

Can't compile v2.1.6 tag on Ubuntu 22.04.LTS #899

Closed
Zabrane opened this issue May 17, 2024 · 3 comments
Closed

Can't compile v2.1.6 tag on Ubuntu 22.04.LTS #899

Zabrane opened this issue May 17, 2024 · 3 comments

Comments

@Zabrane
Copy link

Zabrane commented May 17, 2024

Hi guys

I don't know why even when switching to v2.1.6, cmake is keeps telling me that it will build mimalloc v1.8.0:

> git clone https://github.com/microsoft/mimalloc.git
> mimalloc
> git checkout -b v2.1.6
Switched to a new branch 'v2.1.6'
> mkdir -p out/release
> cd out/release
> cmake ../..
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
--
-- No build type selected, default to: Release
-- Override standard malloc (MI_OVERRIDE=ON)
--
-- Library base name: mimalloc
-- Version          : 1.8       <<<======================
-- Build type       : release
-- C Compiler       : /usr/bin/cc
-- Compiler flags   : -Wall;-Wextra;-Wno-unknown-pragmas;-fvisibility=hidden;-Wstrict-prototypes;-ftls-model=initial-exec;-fno-builtin-malloc
-- Compiler defines :
-- Link libraries   : /usr/lib/x86_64-linux-gnu/libpthread.a;/usr/lib/x86_64-linux-gnu/librt.a
-- Build targets    : shared;static;object;tests
--
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/mimalloc/out/release

Am i missing something?
Many thanks.

@res2k
Copy link
Contributor

res2k commented May 17, 2024

From https://git-scm.com/docs/git-checkout: "Specifying -b causes a new branch to be created as if git-branch[1] were called and then checked out."
So what you're doing is not checking out a specific tag, you're creating a new branch off main, named "v2.1.6".

@Zabrane
Copy link
Author

Zabrane commented May 17, 2024

From https://git-scm.com/docs/git-checkout: "Specifying -b causes a new branch to be created as if git-branch[1] were called and then checked out." So what you're doing is not checking out a specific tag, you're creating a new branch off main, named "v2.1.6".

My bad. Thanks @res2k

> git clone https://github.com/microsoft/mimalloc.git
> mimalloc
> git checkout -b v2.1.6
Switched to a new branch 'v2.1.6'
> mkdir -p out/release
> cd out/release
> cmake ../..
[...]
-- Library base name: mimalloc
-- Version          : 2.1
-- Build type       : release
-- C Compiler       : /usr/bin/cc
-- Compiler flags   : -Wall;-Wextra;-Wno-unknown-pragmas;-fvisibility=hidden;-Wstrict-prototypes;-ftls-model=initial-exec;-fno-builtin-malloc
-- Compiler defines :
-- Link libraries   : /usr/lib/x86_64-linux-gnu/libpthread.a;/usr/lib/x86_64-linux-gnu/librt.a
-- Build targets    : shared;static;object;tests
--
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/mimalloc/out/release

All good.

@Zabrane Zabrane closed this as completed May 17, 2024
@res2k
Copy link
Contributor

res2k commented May 17, 2024

All good.

Just be aware that you're still not using the right command; you're not checking out a specific tag, you're creating a new branch. (Which is also what the output tells you.)

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

2 participants