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 Error: Multiple Definition of 'PID' and 'total_vv_tree_nodes' in MTProxy #617

Open
alihaghighat opened this issue Nov 16, 2024 · 0 comments

Comments

@alihaghighat
Copy link

In the description of the issue, provide detailed information about:

The specific errors you encountered during compilation (e.g., "multiple definition of 'PID'").
The system environment (e.g., Linux distribution, version).
The version of GCC or other compiler you're using.
Any changes you made to the Makefile or other files.

Solution:

In the Makefile, update the CFLAGS and LDFLAGS to the following values:

CFLAGS = -fcommon -O3 -std=gnu11 -Wall -mpclmul -march=native
LDFLAGS = -fcommon -ggdb -rdynamic -lm -lrt -lcrypto -lz -lpthread

This modification ensures that global variables are handled correctly and resolves the compilation errors.

Steps Taken:

  1. Identified the Makefile as the source of the issue.
  2. Added the -fcommon flag to both CFLAGS and LDFLAGS to address the multiple definition errors.
  3. Recompiled the project after cleaning previous build artifacts using make clean.

After making this change, the project compiled successfully without any errors.

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

1 participant