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

Tracy-0.9 GUI fails to build on Linux xubuntu-18.04.6 #484

Closed
dpelle opened this issue Oct 29, 2022 · 3 comments
Closed

Tracy-0.9 GUI fails to build on Linux xubuntu-18.04.6 #484

dpelle opened this issue Oct 29, 2022 · 3 comments

Comments

@dpelle
Copy link

dpelle commented Oct 29, 2022

Tracy-0.9 GUI fails to build on Linux xubuntu-18.04.6.

Tracy-0.8.2 GUI was building fine.
This is the error I get with Tracy-0.9:

$ cd tracy/profiler/build/unix
$ git checkout v0.9
$ PATH=/usr/local/bin:/usr/bin:/bin CC=clang-14 CXX=clang++-14 make
...snip...
clang++-14 -c -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/capstone -I../../../imgui -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -O3 -flto -march=native  -std=c++17 -DNDEBUG -DIMGUI_ENABLE_FREETYPE ../../../server/TracySourceView.cpp -o obj/release/o/o/o/../../../server/TracySourceView.o
../../../server/TracySourceView.cpp:736:46: error: use of undeclared identifier 'CS_GRP_BRANCH_RELATIVE'
                else if( detail.groups[j] == CS_GRP_BRANCH_RELATIVE && opType < OpType::Branch ) opType = OpType::Branch;
                                             ^
../../../server/TracySourceView.cpp:739:46: error: use of undeclared identifier 'CS_GRP_PRIVILEGE'
                else if( detail.groups[j] == CS_GRP_PRIVILEGE && opType < OpType::Privileged )
                                             ^
2 errors generated.
../../../common/unix.mk:30: recipe for target 'obj/release/o/o/o/../../../server/TracySourceView.o' failed
make[1]: *** [obj/release/o/o/o/../../../server/TracySourceView.o] Error 1
make[1]: Leaving directory '/home/dope/sb/tracy/profiler/build/unix'
Makefile:7: recipe for target 'release' failed
make: *** [release] Error 2

It looks like /usr/include/capstone/ is too old on xubuntu-18.04.6.

It's not really a Tracy bug, but perhaps CS_GRP_PRIVILEGE can be made optional in Tracy
to be able to build on older Ubuntu distributions?

@gedalia
Copy link

gedalia commented Oct 29, 2022

You can download and install a newer version of capstone and it will compile.

@dpelle
Copy link
Author

dpelle commented Oct 29, 2022

@gedalia wrote:

You can download and install a newer version of capstone and it will compile.

Right. For reference, I did:

$ sudo apt-get remove libcapstone-dev  libcapstone3
$ git clone https://github.com/libcapstone/libcapstone.git
$ cd libcapstone
$ PATH=/usr/local/bin:/usr/bin:/bin CC=clang-15 CXX=clang++-15 make -j12
$ sudo make install

And then I could build tracy-0.9:

$ cd tracy/profiler/build/unix
$ PATH=/usr/local/bin:/usr/bin:/bin CC=clang-15 CXX=clang++-15 make -j12 debug

@wolfpld
Copy link
Owner

wolfpld commented Oct 29, 2022

Closing, as you have found a solution.

Generally speaking, support for 7-year-old libraries is not something I'm interested in.

https://ubuntu.pkgs.org/18.04/ubuntu-universe-amd64/libcapstone-dev_3.0.4-5_amd64.deb.html
https://www.capstone-engine.org/Version-3.0.4

@wolfpld wolfpld closed this as completed Oct 29, 2022
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