snap-stanford / snap

Stanford Network Analysis Platform (SNAP) is a general purpose network analysis and graph mining library.
Other
2.18k stars 799 forks source link

Compilation Failure on Windows with Cygwin Using Latest GCC, G++, and Libgomp1 Packages #252

Open foroveralls opened 4 months ago

foroveralls commented 4 months ago

Disclaimer: I have not really used C++ or dealt with compliling it before. I'm just using it for this package in a specific project. I apologise if there are basic oversights or assumptions I am missing.

I encountered an issue while trying to compile my project on Windows using Cygwin. The project fails to compile when using the latest versions of gcc, g++, and libgomp1 packages available through Cygwin. However, the project compiles successfully when using the older versions of these packages (7.4.0-1).

Environment

OS: Windows 10 Version: 10.0.19045 Build 19045
Cygwin Version: 3.5.3-1 (Latest)
GCC Version: 11.4.0-1 (Latest)
G++ Version: 11.4.0-1 (Latest)
Libgomp1 Version: 11.4.0-1 (Latest)

Workaround

By downgrading the gcc-core, gcc-g++, and libgomp1 packages to version 7.4.0-1, the project compiles successfully.

Here are the versions that worked:

GCC: 7.4.0-1
G++: 7.4.0-1
Libgomp1: 7.4.0-1

It seems there might be compatibility issues with the latest versions of these packages on Cygwin for Windows. It would be nice if these compatibility issues were mentioned somewhere. I spent a long time trying to get this to complile, and yes maybe for someone more experienced they would have known not to use latest packages or to downgrade, but for people like me just clicking on the default cygwin installation it would help.