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

Nvlax can no longer be built because Zydis has made breaking changes #11

Open
tytan652 opened this issue Dec 13, 2021 · 6 comments
Open

Comments

@tytan652
Copy link

tytan652 commented Dec 13, 2021

Zydis as introduces breaking changes that prevent nvlax from being compiled.

For the time being, you could use CPMAddPackage("gh:zyantific/zydis#55dd08c210722aed81b38132f5fd4a04ec1943b5") or CPMAddPackage("gh:zyantific/zydis#v3.2.1") with some regression changes needed, rather than CPMAddPackage("gh:zyantific/zydis#master") or make the needed changes to nvlax.

@gardotd426
Copy link

Can confirm editing CMakeLists.txt with

CPMAddPackage("gh:zyantific/zydis#55dd08c210722aed81b38132f5fd4a04ec1943b5")

on line 19 allows the project to build.

@lars18th
Copy link

Can confirm editing CMakeLists.txt with

CPMAddPackage("gh:zyantific/zydis#55dd08c210722aed81b38132f5fd4a04ec1943b5")

on line 19 allows the project to build.

Please @gardotd426 provide a PR to update the master. Then almost until someone will update the code the tool will compile.
Thank you for the tip!

@lars18th
Copy link

lars18th commented Feb 1, 2022

PR waiting to merge: #14

@ConstBur
Copy link

ConstBur commented Feb 9, 2022

nvlax can't be built anymore even with this patch, here are the logs:

[ 95%] Building CXX object CMakeFiles/nvlax_encode.dir/src/lax_encode.cc.o
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_fbc.cc: In function ‘int main(int, char**)’:
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_fbc.cc:40:27: error: request for member ‘virtual_address’ in ‘s_rodata’, which is of pointer type ‘LIEF::ELF::Section*’ (maybe you meant to use ‘->’ ?)
   40 |         offset = s_rodata.virtual_address() + s_rodata.search("This hardware does not support NvFBC");
      |                           ^~~~~~~~~~~~~~~
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_fbc.cc:40:56: error: request for member ‘search’ in ‘s_rodata’, which is of pointer type ‘LIEF::ELF::Section*’ (maybe you meant to use ‘->’ ?)
   40 |         offset = s_rodata.virtual_address() + s_rodata.search("This hardware does not support NvFBC");
      |                                                        ^~~~~~
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_fbc.cc:52:38: error: request for member ‘content’ in ‘s_text’, which is of pointer type ‘LIEF::ELF::Section*’ (maybe you meant to use ‘->’ ?)
   52 |         auto v_text_content = s_text.content();
      |                                      ^~~~~~~
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_fbc.cc:61:38: error: request for member ‘virtual_address’ in ‘s_text’, which is of pointer type ‘LIEF::ELF::Section*’ (maybe you meant to use ‘->’ ?)
   61 |                 size_t temp = s_text.virtual_address() +
      |                                      ^~~~~~~~~~~~~~~
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_fbc.cc:67:37: error: request for member ‘virtual_address’ in ‘s_text’, which is of pointer type ‘LIEF::ELF::Section*’ (maybe you meant to use ‘->’ ?)
   67 |                     offset = s_text.virtual_address() + data - v_text_content.data();
      |                                     ^~~~~~~~~~~~~~~
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_encode.cc: In function ‘void patch_linux(LIEF::ELF::Binary*)’:
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_encode.cc:45:78: error: request for member ‘value’ in ‘f_nvenc_ci’, which is of pointer type ‘LIEF::Symbol*’ (maybe you meant to use ‘->’ ?)
   45 |         auto v_func_bytes = bin->get_content_from_virtual_address(f_nvenc_ci.value(), 0x260);
      |                                                                              ^~~~~
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_encode.cc:53:37: error: request for member ‘value’ in ‘f_nvenc_ci’, which is of pointer type ‘LIEF::Symbol*’ (maybe you meant to use ‘->’ ?)
   53 |                 offset = f_nvenc_ci.value() +
      |                                     ^~~~~
make[2]: *** [CMakeFiles/nvlax_fbc.dir/build.make:90: CMakeFiles/nvlax_fbc.dir/src/lax_fbc.cc.o] Error 1
make[2]: Leaving directory '/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/build'
make[1]: *** [CMakeFiles/Makefile2:219: CMakeFiles/nvlax_fbc.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/nvlax_encode.dir/build.make:90: CMakeFiles/nvlax_encode.dir/src/lax_encode.cc.o] Error 1
make[2]: Leaving directory '/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/build'
make[1]: *** [CMakeFiles/Makefile2:190: CMakeFiles/nvlax_encode.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/build'
make: *** [Makefile:136: all] Error 2
make: Leaving directory '/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/build'
==> ERROR: A failure occurred in build().
    Aborting...

This occurs both with any nvlax AUR package/utility and compiling directly from source with the patch in the PR above.
Edit: made a separate issue for this: #16

@tytan652
Copy link
Author

tytan652 commented Feb 9, 2022

Patch to replace each master branch call

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5fa8620..ee2f230 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,11 +16,11 @@ project(nvlax CXX)
 include(ExternalProject)
 include(cmake/FetchCPM.cmake)
 
-CPMAddPackage("gh:zyantific/zydis#master")
+CPMAddPackage("gh:zyantific/zydis#55dd08c210722aed81b38132f5fd4a04ec1943b5")
 
 CPMAddPackage(
         NAME LIEF_SRC
-        GIT_TAG master
+        GIT_TAG b65e7cca03ec4cd91f1d7125e717d01635ea81ba
         GITHUB_REPOSITORY lief-project/LIEF
         DOWNLOAD_ONLY YES
 )
@@ -59,7 +59,7 @@ message(STATUS "LIEF library: ${LIEF_LIBRARIES}")
 
 CPMAddPackage(
         NAME PPK_ASSERT
-        GIT_TAG master
+        GIT_TAG 833b8b7ea49aea540a49f07ad08bf0bae1faac32
         GITHUB_REPOSITORY gpakosz/PPK_ASSERT
         DOWNLOAD_ONLY YES
 )

@ConstBur
Copy link

ConstBur commented Feb 9, 2022

Nice, that fixed it, thank you! 😄

spgoodman added a commit to spgoodman/nvlax that referenced this issue May 29, 2024
Updated references to master branches to use main instead as per this post on the source repo:

illnyang#11 (comment)
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

4 participants