Skip to content

Problem compiling on Linux #18

@movitto

Description

@movitto

Good morning! I'm running into an issue when attempting to compile BrowserHack from source on Linux, specifically Fedora 24.

I've installed the latest emscripten release from the sdk tgz available on the emscripten website.

After cloning this project, I had to edit the EMCC variable in build.sh to point to my emscripten installation. After that, attempting to run ./build.sh results in:

$ ./build.sh 
Copying Makefiles.
( cd src ; make )
make[1]: Entering directory '/home/mmorsi/workspace/tmp/BrowserHack/src'
touch ../src/config.h-t
/home/mmorsi/workspace/tmp/emsdk-portable/emscripten/1.37.9/emcc -O3 -I../include -c monst.c
/home/mmorsi/workspace/tmp/emsdk-portable/emscripten/1.37.9/emcc -O3 -I../include -c objects.c
/home/mmorsi/workspace/tmp/emsdk-portable/emscripten/1.37.9/emcc -O3 -I../include   -c -o alloc.o alloc.c
make[2]: Entering directory '/home/mmorsi/workspace/tmp/BrowserHack/util'
/home/mmorsi/workspace/tmp/emsdk-portable/emscripten/1.37.9/emcc -O3 -I../include   -c -o makedefs.o makedefs.c
makedefs.c:361:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
        Fprintf(ofp,Dont_Edit_Data);
                    ^~~~~~~~~~~~~~
makedefs.c:361:14: note: treat the string as an argument to avoid this
        Fprintf(ofp,Dont_Edit_Data);
                    ^
                    "%s", 
makedefs.c:560:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
        Fprintf(ofp,Dont_Edit_Code);
                    ^~~~~~~~~~~~~~
makedefs.c:560:14: note: treat the string as an argument to avoid this
        Fprintf(ofp,Dont_Edit_Code);
                    ^
                    "%s", 
makedefs.c:1235:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
        Fprintf(ofp,Dont_Edit_Data);
                    ^~~~~~~~~~~~~~
makedefs.c:1235:14: note: treat the string as an argument to avoid this
        Fprintf(ofp,Dont_Edit_Data);
                    ^
                    "%s", 
makedefs.c:1357:17: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
    Fprintf(ofp,Dont_Edit_Code);
                ^~~~~~~~~~~~~~
makedefs.c:1357:17: note: treat the string as an argument to avoid this
    Fprintf(ofp,Dont_Edit_Code);
                ^
                "%s", 
makedefs.c:1398:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
        Fprintf(ofp,Dont_Edit_Code);
                    ^~~~~~~~~~~~~~
makedefs.c:1398:14: note: treat the string as an argument to avoid this
        Fprintf(ofp,Dont_Edit_Code);
                    ^
                    "%s", 
/home/mmorsi/workspace/tmp/emsdk-portable/emscripten/1.37.9/emcc -O3 -I../include   -c -o dlb.o dlb.c
makedefs.c:1714:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
        Fprintf(ofp,Dont_Edit_Code);
                    ^~~~~~~~~~~~~~
makedefs.c:1714:14: note: treat the string as an argument to avoid this
        Fprintf(ofp,Dont_Edit_Code);
                    ^
                    "%s", 
makedefs.c:1869:17: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
    Fprintf(ofp,Dont_Edit_Code);
                ^~~~~~~~~~~~~~
makedefs.c:1869:17: note: treat the string as an argument to avoid this
    Fprintf(ofp,Dont_Edit_Code);
                ^
                "%s", 
makedefs.c:1894:17: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
    Fprintf(ofp,Dont_Edit_Code);
                ^~~~~~~~~~~~~~
makedefs.c:1894:17: note: treat the string as an argument to avoid this
    Fprintf(ofp,Dont_Edit_Code);
                ^
                "%s", 
8 warnings generated.
/home/mmorsi/workspace/tmp/emsdk-portable/emscripten/1.37.9/emcc -O3 -I../include -c ../sys/unix/unixres.c
/home/mmorsi/workspace/tmp/emsdk-portable/emscripten/1.37.9/emcc   makedefs.o   -o makedefs
make[2]: Leaving directory '/home/mmorsi/workspace/tmp/BrowserHack/util'
make[2]: Entering directory '/home/mmorsi/workspace/tmp/BrowserHack/util'
make[2]: Entering directory '/home/mmorsi/workspace/tmp/BrowserHack/util'
/home/mmorsi/workspace/tmp/emsdk-portable/emscripten/1.37.9/emcc  --pre-js ../win/web/mount_nodefs.js  -o makedefs.js makedefs.o ../src/monst.o ../src/objects.o
/home/mmorsi/workspace/tmp/emsdk-portable/emscripten/1.37.9/emcc  --pre-js ../win/web/mount_nodefs.js  -o makedefs.js makedefs.o ../src/monst.o ../src/objects.o
make[2]: Entering directory '/home/mmorsi/workspace/tmp/BrowserHack/util'
make[2]: Entering directory '/home/mmorsi/workspace/tmp/BrowserHack/util'
/home/mmorsi/workspace/tmp/emsdk-portable/emscripten/1.37.9/emcc  --pre-js ../win/web/mount_nodefs.js  -o makedefs.js makedefs.o ../src/monst.o ../src/objects.o
/home/mmorsi/workspace/tmp/emsdk-portable/emscripten/1.37.9/emcc  --pre-js ../win/web/mount_nodefs.js  -o makedefs.js makedefs.o ../src/monst.o ../src/objects.o
js ./makedefs.js -o
js ./makedefs.js -p
js ./makedefs.js -z
js ./makedefs.js -m
./makedefs.js:9: ReferenceError: require is not defined
Makefile:198: recipe for target '../include/onames.h' failed
make[2]: *** [../include/onames.h] Error 3
make[2]: Leaving directory '/home/mmorsi/workspace/tmp/BrowserHack/util'
Makefile:488: recipe for target '../include/onames.h' failed
make[1]: *** [../include/onames.h] Error 2
make[1]: *** Waiting for unfinished jobs....
./makedefs.js:9: ReferenceError: require is not defined
Makefile:200: recipe for target '../include/pm.h' failed
make[2]: *** [../include/pm.h] Error 3
make[2]: Leaving directory '/home/mmorsi/workspace/tmp/BrowserHack/util'
Makefile:490: recipe for target '../include/pm.h' failed
make[1]: *** [../include/pm.h] Error 2
./makedefs.js:9: ReferenceError: require is not defined
./makedefs.js:9: ReferenceError: require is not defined
Makefile:202: recipe for target '../src/monstr.c' failed
make[2]: *** [../src/monstr.c] Error 3
make[2]: Leaving directory '/home/mmorsi/workspace/tmp/BrowserHack/util'
Makefile:492: recipe for target 'monstr.c' failed
make[1]: *** [monstr.c] Error 2
Makefile:204: recipe for target '../include/vis_tab.h' failed
make[2]: *** [../include/vis_tab.h] Error 3
make[2]: Leaving directory '/home/mmorsi/workspace/tmp/BrowserHack/util'
Makefile:494: recipe for target '../include/vis_tab.h' failed
make[1]: *** [../include/vis_tab.h] Error 2
make[1]: Leaving directory '/home/mmorsi/workspace/tmp/BrowserHack/src'
Makefile:92: recipe for target 'nethack' failed
make: *** [nethack] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions