tuhh-softsec / vul4j

Vul4J: A Dataset of Reproducible Java Vulnerabilities
GNU General Public License v3.0
51 stars 22 forks source link

Compile failed #25

Open zel2023 opened 1 week ago

zel2023 commented 1 week ago

I have successfully installed vul4j. I have also installed JAVA7, JAVA8, and MAVEN3, but when I run “vul4j compile -d /tmp/vul4j/VUL4J-10”, it still says “Compile failed”.

Asurce commented 2 days ago

Hi

Have you checked the compile.log inside the VUL4J-10/VUL4J directory? It might give you some hints about the issue. Also make sure you have set the correct java paths in the environment variables or config.py file (you need to run the setup script again after modifying the file).

zel2023 commented 1 day ago

Thank you for your response. I have ensured that the Java path in the config.py file has been modified. Additionally, I checked the compile.log file, which initially showed the message 'Invalid maximum heap size: -Xmx4g'. I then changed '-Xmx4g' to '-Xmx1g' in the config.py and attempted to compile again, but it still failed. Upon checking the compile log file, I found the following error message. 微信图片_20240627224345

Asurce commented 1 day ago

I attempted to reproduce the problem in a clean linux environment (Debian Bookworm container), but I haven't encountered any issues, the build was successful. I have noticed that your build time was 55 minutes, while mine was 35 seconds (with dependency downloads). Based on build/download times and this stackoverflow post, you might have some kind of network problem.

You could try running mvn dependency:resolve to download all project dependencies beforehand. However, I recommend using the alldeps docker container, which includes all needed dependencies for each project. Though, it is over 10GB in size.

zel2023 commented 10 hours ago

Thank you for your suggestion. I will try the method you mentioned.