McArcady / lnp-forge

A Dwarf Fortress starter pack builder for Linux & MacOS
Other
239 stars 19 forks source link

Can't compile due to f-permissive error #66

Closed Foxtrot-Uniform closed 2 years ago

Foxtrot-Uniform commented 2 years ago

I tried to git clone --recursive then compile but it failed. I use Debian Sid and I am on latest packages

`debian@debian:~$ git clone --recursive https://github.com/McArcady/lnp-forge Cloning into 'lnp-forge'... remote: Enumerating objects: 1808, done. remote: Counting objects: 100% (664/664), done. remote: Compressing objects: 100% (386/386), done. remote: Total 1808 (delta 382), reused 439 (delta 204), pack-reused 1144 Receiving objects: 100% (1808/1808), 562.71 KiB | 1.29 MiB/s, done. Resolving deltas: 100% (1104/1104), done. debian@debian:~$ cd lnp* debian@debian:~/lnp-forge$ sudo ./configure --prefix=$PWD && sudo make install checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for a sed that does not truncate output... /usr/bin/sed checking whether sed understands -r -i -e... yes checking whether ln -s works... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking how to run the C preprocessor... gcc -E checking for ranlib... ranlib checking for gobjcopy... no checking for objcopy... objcopy checking for absolute path to objcopy... /usr/bin/objcopy checking for gobjdump... no checking for objdump... objdump checking for absolute path to objdump... /usr/bin/objdump checking for greadelf... no checking for readelf... readelf checking for absolute path to readelf... /usr/bin/readelf checking for gperf... gperf checking for absolute path to gperf... /usr/bin/gperf checking for bison... bison checking for flex... flex checking for makeinfo... makeinfo checking for cut... cut checking for stat... stat checking for readlink... readlink checking for wget... wget checking for tar... tar checking for gzip... gzip checking for bzip2... bzip2 checking for help2man... help2man checking for rsync... rsync checking for gpatch... no checking for patch... patch checking for absolute path to patch... /usr/bin/patch checking for bash >= 3.1... /usr/bin/bash checking for GNU awk... /usr/bin/gawk checking for GNU make >= 3.80... /usr/bin/gmake checking whether /usr/bin/gmake sets $(MAKE)... yes checking for make 3.81... no checking for cmake... /usr/bin/cmake checking for qmake-qt5... no checking for qmake-qt4... no checking for qmake... /usr/bin/qmake checking for GNU libtoolize >= 1.5.26... /usr/bin/libtoolize checking for GNU automake >= 1.10... /usr/bin/automake checking for the type used in gperf declarations... size_t checking for tclsh... /usr/bin/tclsh checking for wish... /usr/bin/wish checking tcl version... 8.6 checking for python3... /usr/bin/python3 checking python3 module: tkinter... yes checking for java... /usr/bin/java checking for java 1.8 or 11... yes checking for fpm... no configure: WARNING: Ruby gem 'fpm' (Effing package management) is missing: rpm, deb and arch packaging will not be available checking for git... /usr/bin/git checking for hg... /usr/bin/hg checking for ninja... /usr/bin/ninja checking for cargo... /usr/bin/cargo checking for perl... perl checking for perl module XML::LibXML... ok checking for perl module XML::LibXSLT... ok checking for library containing IMG_Load... no checking for library containing TTF_OpenFont... no checking for library containing gzopen... -lz configure: WARNING: Some 32-bits dependencies are missing, DwarfFortress < 0.43.05 will not be available checking for IMG_Load in -l:libSDL_image-1.2.so.0... yes checking for TTF_OpenFont in -l:libSDL_ttf-2.0.so.0... yes checking for gzopen in -lz... yes checking for xz... xz checking for inline... inline checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible realloc... yes checking for size_t... yes checking for working alloca.h... yes checking for alloca... yes checking libintl.h usability... yes checking libintl.h presence... yes checking for libintl.h... yes checking whether gettext is declared... yes checking for library containing bindtextdomain... none required checking ncurses/ncurses.h usability... no checking ncurses/ncurses.h presence... no checking for ncurses/ncurses.h... no checking ncurses/curses.h usability... no checking ncurses/curses.h presence... no checking for ncurses/curses.h... no checking ncursesw/curses.h usability... yes checking ncursesw/curses.h presence... yes checking for ncursesw/curses.h... yes checking for library containing initscr... -lncursesw checking for library containing tgetent... none required configure: creating ./config.status config.status: creating Makefile SED 'lnp-forge' SED 'scripts/lnp-forge.sh' SED 'scripts/showTuple.sh' GEN 'config/configure.in' GEN 'paths.mk' GEN 'paths.sh' DEP 'nconf.gui.dep' DEP 'nconf.dep' DEP 'lxdialog/yesno.dep' DEP 'lxdialog/util.dep' DEP 'lxdialog/textbox.dep' DEP 'lxdialog/menubox.dep' DEP 'lxdialog/inputbox.dep' DEP 'lxdialog/checklist.dep' DEP 'mconf.dep' DEP 'conf.dep' BISON 'zconf.tab.c' GPERF 'zconf.hash.c' LEX 'zconf.lex.c' DEP 'zconf.tab.dep' CC 'zconf.tab.o' CC 'conf.o' LD 'conf' CC 'lxdialog/checklist.o' CC 'lxdialog/inputbox.o' CC 'lxdialog/menubox.o' CC 'lxdialog/textbox.o' CC 'lxdialog/util.o' CC 'lxdialog/yesno.o' CC 'mconf.o' LD 'mconf' CC 'nconf.o' CC 'nconf.gui.o' LD 'nconf' MKDIR '/home/debian/lnp-forge/bin/' INST 'lnp-forge' MKDIR '/home/debian/lnp-forge/lib/0.47.05-rc4/' INSTDIR 'config/' INSTDIR 'patches/' INSTDIR 'scripts/' INST 'steps.mk' INST 'paths' INST 'kconfig/' debian@debian:~/lnp-forge$ ./bin/lnp-forge menuconfig MKDIR config.gen IN config.gen/arch.in IN config.gen/kernel.in IN config.gen/cc.in IN config.gen/binutils.in IN config.gen/libc.in IN config.gen/debug.in CONF config/config.in configuration written to .config

End of the configuration. Execute 'lnp-forge build' to start the build or try 'lnp-forge help'.

debian@debian:~/lnp-forge$ ls appimage config config.log configure COPYING kconfig lnp-forge m4 Makefile.in paths.mk README.md steps.mk bin config.gen config.status configure.ac fedora.spec lib lnp-forge.in Makefile patches paths.sh scripts version.sh debian@debian:~/lnp-forge$ ./bin/lnp-forge build [INFO ] Performing some trivial sanity checks [INFO ] Build started 20220211.170328 [INFO ] Building environment variables [INFO ] ================================================================= [INFO ] Retrieving needed components' tarballs [INFO ] Retrieving 'lnp-0.14a' from 'https://github.com/Pidgeot/python-lnp' [INFO ] Got 'lnp-0.14a' [INFO ] Retrieving 'df_47_05_linux' from http://www.bay12games.com/dwarves/ [INFO ] Got 'df_47_05_linux' [INFO ] Retrieving 'graphics-master' from 'https://github.com/McArcady/DFgraphics.git' [INFO ] Got 'graphics-master' [INFO ] Retrieving 'shared-master' from 'https://github.com/Lazy-Newb-Pack/LNP-shared-core' [INFO ] Got 'shared-master' [INFO ] Retrieving 'Keyboard_FR' from https://raw.githubusercontent.com/McArcady/LNP-shared-core/master/keybinds [INFO ] Got 'Keyboard_FR' [INFO ] Retrieving 'dfhack-0.47.05-r3' from 'https://github.com/DFHack/dfhack.git' [INFO ] Got 'dfhack-0.47.05-r3' [INFO ] Retrieving 'twbt-0.47.05-r3' from 'https://github.com/thurin/df-twbt.git' [INFO ] Got 'twbt-0.47.05-r3' [INFO ] Retrieving 'kloker-master' from 'https://github.com/strainer/cavekeeperdf' [INFO ] Got 'kloker-master' [INFO ] Retrieving 'therapist-v41.2.3' from 'https://github.com/Dwarf-Therapist/Dwarf-Therapist' [INFO ] Got 'therapist-v41.2.3' [INFO ] Retrieving 'soundsense-rs-master' from 'https://github.com/prixt/soundsense-rs.git' [INFO ] Got 'soundsense-rs-master' [INFO ] Retrieving 'legendsbrowser-1.19.2' from https://github.com/robertjanetzko/LegendsBrowser/releases/download/1.19.2 [INFO ] Got 'legendsbrowser-1.19.2' [INFO ] Retrieving 'announcement-v1.3.0' from 'https://github.com/BrachystochroneSD/AnnouncementWindow' [INFO ] Got 'announcement-v1.3.0' [INFO ] Retrieving needed components' tarballs: done in 1007.65s (at 16:51) [INFO ] ================================================================= [INFO ] Extracting and patching components [INFO ] Extracting 'lnp-0.14a' [INFO ] Patching 'lnp-0.14a' [INFO ] Extracting 'df_47_05_linux' [INFO ] Extracting 'graphics-master' [INFO ] Patching 'graphics-master' [INFO ] Extracting 'shared-master' [INFO ] Patching 'shared-master' [INFO ] Extracting 'dfhack-0.47.05-r3' [INFO ] Patching 'dfhack-0.47.05-r3' [INFO ] Extracting 'twbt-0.47.05-r3' [INFO ] Extracting 'kloker-master' [INFO ] Patching 'kloker-master' [INFO ] Extracting 'therapist-v41.2.3' [INFO ] Patching 'therapist-v41.2.3' [INFO ] Extracting 'soundsense-rs-master' [INFO ] Patching 'soundsense-rs-master' [INFO ] Extracting 'announcement-v1.3.0' [INFO ] Patching 'announcement-v1.3.0' [INFO ] Extracting and patching components: done in 14.29s (at 17:05) [INFO ] ================================================================= [INFO ] Building components [INFO ] ================================================================= [INFO ] Building lnp-0.14a [INFO ] Building lnp-0.14a: done in 0.56s (at 17:06) [INFO ] ================================================================= [INFO ] Credits for lnp-0.14a [INFO ] Credits for lnp-0.14a: done in 0.04s (at 17:06) [INFO ] ================================================================= [INFO ] Building df-47_05_linux [INFO ] Already extracted 'df_47_05_linux' [INFO ] Building df-47_05_linux: done in 1.23s (at 17:07) [INFO ] ================================================================= [INFO ] Credits for df-47_05_linux [INFO ] Credits for df-47_05_linux: done in 0.05s (at 17:08) [INFO ] ================================================================= [INFO ] Building graphics-master [INFO ] Building graphics-master: done in 8.96s (at 17:17) [INFO ] ================================================================= [INFO ] Credits for graphics-master [INFO ] Credits for graphics-master: done in 0.05s (at 17:17) [INFO ] ================================================================= [INFO ] Building shared-master [INFO ] Building shared-master: done in 1.16s (at 17:18) [INFO ] ================================================================= [INFO ] Credits for shared-master [INFO ] Credits for shared-master: done in 0.05s (at 17:18) [INFO ] ================================================================= [INFO ] Building dfhack-0.47.05-r3 [ERROR] /home/debian/lnp-forge/.build/src/dfhack-0.47.05-r3/plugins/twbt/config.hpp:580:77: error: taking address of rvalue [-fpermissive] [ERROR]
[ERROR] >> [ERROR] >> Build failed in step 'Building dfhack-0.47.05-r3' [ERROR] >> called in step 'Building components' [ERROR] >> called in step '(top-level)' [ERROR] >> [ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@261] [ERROR] >> called from: do_dfhack_build[scripts/build/dfhack.sh@58] [ERROR] >> called from: main[scripts/lnp-forge.sh@631] [ERROR] >> [ERROR] >> For more info on this error, look at the file: 'build.log' [ERROR] >> There is a list of known issues, some with workarounds, in: [ERROR] >> '@@CT_DOCDIR@@/B - Known issues.txt' [ERROR]
[ERROR] (elapsed: 44:25.65) gmake: *** [bin/lnp-forge:151: build] Error 1 debian@debian:~/lnp-forge$ htop debian@debian:~/lnp-forge$`

,and here are my build.log and config.log files build.log config.log

McArcady commented 2 years ago

The compiler may be too recent for TWBT. I would try adding "-fpermissive" in: bin/lnp-forge menuconfig > Path & misc > Extra build compiler flags

[EDIT] inadequate solution, see the other workaround in my comment below

jonathanabennett commented 2 years ago

I have the same error. Adding -fpermissive did not fix it. I tried it with "-fpermissive" and with just "fpermissive", same error both times.

build.log config.log

tamimmahmudkhan commented 2 years ago

I have the same exact error but on Arch Linux. As a side note the pre-built version also does not launch df itself. Crashes with a libgtk missing error even though I have gtk3 installed.

McArcady commented 2 years ago

Could you try recompliling with the "-fpermissive' flag?
For that, edit: .build/src/dfhack-0.47.05-r3/plugins/twbt/CMakeLists.txt and fix line 17 like this:

-  SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x" )
+  SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -fpermissive" )

Then build again with lnp-forge: $ bin/lnp-forge build

hereticaljavascripter commented 2 years ago

for me that fixed that problem

McArcady commented 2 years ago

@tamimmahmudkhan A dependency seems to be missing from the Arch package. Would you have a log of the missing libgtk error?

tamimmahmudkhan commented 2 years ago

The libgtk error was fixed by installing gtk2. It seems gtk3 and 4 don't count. It needs to be gtk2. The build still fails with the same error however. I checked with the edits you mentioned to twbt cmakelists as well.

McArcady commented 2 years ago

fixed by 19b6e55