LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Cannot build physfs-2.0.2 on slackware64 -current (https://www.linuxquestions.org/questions/slackware-14/cannot-build-physfs-2-0-2-on-slackware64-current-938985/)

andrew.46 04-09-2012 08:23 PM

Cannot build physfs-2.0.2 on slackware64 -current
 
I am having trouble building physfs-2.0.2 from Sbo on a slackware64 -current setup:

Code:

[ 47%] Building C object CMakeFiles/physfs.dir/archivers/wad.o
/tmp/SBo/physfs-2.0.2/archivers/wad.c: In function ‘wad_load_entries’:
/tmp/SBo/physfs-2.0.2/archivers/wad.c:248:10: error: variable ‘lastDirectory’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/physfs.dir/archivers/wad.o] Error 1
make[1]: *** [CMakeFiles/physfs.dir/all] Error 2
make: *** [all] Error 2

I have found this error elsewhere but cannot see the fix :(. Anybody else have this running successfully?

larryhaja 04-09-2012 09:43 PM

It looks like the -Werror flag is giving you a problem. Builds fine here on Slackware 13.37. It seems that the gentoo and archlinux build scripts actually gets rid of -Werror. You might want to try this in the slackbuild right before cmake is ran.

Code:

--- physfs.SlackBuild.orig      2011-11-04 17:31:00.000000000 -0700
+++ physfs.SlackBuild  2012-04-09 19:39:25.406019188 -0700
@@ -65,6 +65,8 @@
 chown -R root:root .
 chmod -R a-s,u+w,go+r-w .
 
+sed -i 's|-Werror||' CMakeLists.txt
+
 cmake \
  -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
  -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \


andrew.46 04-09-2012 10:21 PM

Thanks a lot, this allowed compilation to succeed :). One step closer to running dx2-rebirth!!!


All times are GMT -5. The time now is 01:58 PM.