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

Compilation errors due to warnings treated as errors #422

Open
Sadrahel opened this issue Jun 25, 2024 · 1 comment
Open

Compilation errors due to warnings treated as errors #422

Sadrahel opened this issue Jun 25, 2024 · 1 comment
Labels

Comments

@Sadrahel
Copy link

I encountered several compilation errors while trying to build Marian on my system. The errors seem to stem from warnings being treated as errors by the compiler.
System details:

Operating System: Debian
CUDA version: 12.5
GCC version: 12.2.0
CMake version: 3.22.0

Steps to reproduce:
1- Clone the Marian repository
2- Create a build directory and navigate into it
3- Configure the build with:
cmake .. -DCOMPILE_CUDA=on
4- Compile with:
make -j16

Errors encountered:
The compilation fails with several errors, mostly related to the use-after-free warning in various parts of the Marian code. Here's an example:
/home/guillaume/EDSUtilities/marian/src/common/intrusive_ptr.h:24:23: error: pointer used after 'void operator delete(void*, std::size_t)' [-Werror=use-after-free]
24 | if(x != 0 && --x->references_ == 0) {
| ~~~^~~~~~~~~~~

Attempts to resolve:

1- I tried disabling the specific use-after-free warning by passing -Wno-error=use-after-free to CMake, but other warnings were still treated as errors, causing the compilation to fail.
2- I also tried disabling the treatment of all warnings as errors with -Wno-error, but the compilation still failed.

Additional information:

I am trying to compile Marian to use it for machine translation tasks.
I have CUDA and cuDNN properly installed and configured on my system.
I have also installed all necessary dependencies for Marian.

Please let me know if you need any further information to diagnose and resolve these compilation issues. I would be happy to provide more details or test any potential fixes.
Thank you for your attention to this matter.
Best regards

@NovaYear
Copy link

NovaYear commented Jan 6, 2025

You don't need to write the parameter -DCOMPILE_CUDA=on, it is already on by default.
The errors you are encountering are probably caused by trying to compile with higher version tools. I experienced similar problems, but was later able to compile using ~2022 versions of many libraries and dependencies.
The information on this page may be useful for compiling. Take a look if you want.

#423
^^ How to compile marian on windows 10/11 with WSL step by step guide (ubuntu20.04)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants