nosuchtim / keykit

KeyKit - an algorithmic MIDI scripting language and GUI system
Other
98 stars 7 forks source link

Linux 64 bits compilation, seems not to work #5

Closed tzitzimime closed 3 years ago

tzitzimime commented 4 years ago

Hi. thanks for share your code

I tried to install on Debian 10 with no luck.

Maybe the documentation is not up to date.

$ make install_linux
make: *** No hay ninguna regla para construir el objetivo 'install_linux'.  Alto.

I have also tried to install linux alsa but it failed

$ sudo make install_linux_alsa
if [ ! -d bin ] ; then mkdir bin ; fi
make install_stdio
make[1]: se entra en el directorio '/home/jaime/git/keykit'
make copy_stdio
make[2]: se entra en el directorio '/home/jaime/git/keykit'
if [ ! -d bin ] ; then mkdir bin ; fi
cp mdep/stdio/mdep1.c src/mdep1.c
cp mdep/stdio/mdep2.c src/mdep2.c
cp mdep/stdio/mdep.h src/mdep.h
cp mdep/stdio/makefile src/makefile
cp mdep/stdio/clock.c src/clock.c
cp mdep/stdio/midi.c src/midi.c
chmod +x mdep/stdio/rmcr
mdep/stdio/rmcr src/*.c src/*.h src/makefile
mdep/stdio/rmcr lib/*
cp mdep/stdio/resetkeylib bin
mdep/stdio/rmcr bin/resetkeylib
chmod +x bin/resetkeylib
mdep/stdio/rmcr tests/*
make[2]: se sale del directorio '/home/jaime/git/keykit'
cd byacc ; make -f makefile.stdio clobber ; make -f makefile.stdio
make[2]: se entra en el directorio '/home/jaime/git/keykit/byacc'
make[2]: se sale del directorio '/home/jaime/git/keykit/byacc'
make[2]: se entra en el directorio '/home/jaime/git/keykit/byacc'
gcc -O -Wno-implicit-int -Wno-builtin-declaration-mismatch -Wno-implicit-function-declaration   -c -o closure.o closure.c
gcc -O -Wno-implicit-int -Wno-builtin-declaration-mismatch -Wno-implicit-function-declaration   -c -o error.o error.c
gcc -O -Wno-implicit-int -Wno-builtin-declaration-mismatch -Wno-implicit-function-declaration   -c -o lalr.o lalr.c
gcc -O -Wno-implicit-int -Wno-builtin-declaration-mismatch -Wno-implicit-function-declaration   -c -o lr0.o lr0.c
gcc -O -Wno-implicit-int -Wno-builtin-declaration-mismatch -Wno-implicit-function-declaration   -c -o main.o main.c
gcc -O -Wno-implicit-int -Wno-builtin-declaration-mismatch -Wno-implicit-function-declaration   -c -o mkpar.o mkpar.c
gcc -O -Wno-implicit-int -Wno-builtin-declaration-mismatch -Wno-implicit-function-declaration   -c -o output.o output.c
gcc -O -Wno-implicit-int -Wno-builtin-declaration-mismatch -Wno-implicit-function-declaration   -c -o reader.o reader.c
gcc -O -Wno-implicit-int -Wno-builtin-declaration-mismatch -Wno-implicit-function-declaration   -c -o skeleton.o skeleton.c
gcc -O -Wno-implicit-int -Wno-builtin-declaration-mismatch -Wno-implicit-function-declaration   -c -o symtab.o symtab.c
gcc -O -Wno-implicit-int -Wno-builtin-declaration-mismatch -Wno-implicit-function-declaration   -c -o verbose.o verbose.c
gcc -O -Wno-implicit-int -Wno-builtin-declaration-mismatch -Wno-implicit-function-declaration   -c -o warshall.o warshall.c
/usr/bin/ld: main.o: en la función `create_file_names':
main.c:(.text+0x471): aviso: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
done
make[2]: se sale del directorio '/home/jaime/git/keykit/byacc'
cd src ; make clean ; make install
make[2]: se entra en el directorio '/home/jaime/git/keykit/src'
rm -f d_*.h
rm -f *.o lowkey protoflp keylib
make[2]: se sale del directorio '/home/jaime/git/keykit/src'
make[2]: se entra en el directorio '/home/jaime/git/keykit/src'
gcc -static protoflp.c -o protoflp
./protoflp -p -dd_code.h < code.c > tmp.c
./protoflp -p -dd_code2.h < code2.c > tmp.c
./protoflp -p -dd_fsm.h < fsm.c > tmp.c
./protoflp -p -dd_grid.h < grid.c > tmp.c
./protoflp -p -dd_keyto.h < keyto.c > tmp.c
./protoflp -p -dd_main.h < main.c > tmp.c
./protoflp -p -dd_mdep1.h < mdep1.c > tmp.c
./protoflp -p -dd_menu.h < menu.c > tmp.c
./protoflp -p -dd_mfin.h < mfin.c > tmp.c
./protoflp -p -dd_midi.h < midi.c > tmp.c
./protoflp -p -dd_misc.h < misc.c > tmp.c
./protoflp -p -dd_phrase.h < phrase.c > tmp.c
./protoflp -p -dd_real.h < real.c > tmp.c
./protoflp -p -dd_sym.h < sym.c > tmp.c
./protoflp -p -dd_util.h < util.c > tmp.c
./protoflp -p -dd_view.h < view.c > tmp.c
./protoflp -p -dd_task.h < task.c > tmp.c
./protoflp -p -dd_fifo.h < fifo.c > tmp.c
./protoflp -p -dd_kwind.h < kwind.c > tmp.c
./protoflp -p -dd_regex.h < regex.c > tmp.c
./protoflp -p -dd_bltin.h < bltin.c > tmp.c
./protoflp -p -dd_meth.h < meth.c > tmp.c
./protoflp -p -dd_clock.h < clock.c > tmp.c
./protoflp -p -dd_mdep2.h < mdep2.c > tmp.c
gcc -c yacc.c
gcc -c main.c
gcc -c util.c
gcc -c misc.c
gcc -c phrase.c
gcc -c sym.c
gcc -c keyto.c
gcc -c code.c
gcc -c code2.c
gcc -c grid.c
gcc -c view.c
gcc -c menu.c
gcc -c task.c
gcc -c fifo.c
gcc -c mfin.c
gcc -c real.c
gcc -c mdep1.c
gcc -c mdep2.c
gcc -c kwind.c
gcc -c fsm.c
gcc -c bltin.c
gcc -c meth.c
gcc -c regex.c
gcc -c midi.c
gcc -c clock.c
gcc -static -O yacc.o main.o util.o misc.o phrase.o sym.o keyto.o code.o code2.o grid.o view.o menu.o task.o fifo.o mfin.o real.o mdep1.o mdep2.o kwind.o fsm.o bltin.o meth.o regex.o midi.o clock.o -lm -o lowkey
cp lowkey ../bin/lowkey
cd ../lib ; ../bin/resetkeylib
make[2]: se sale del directorio '/home/jaime/git/keykit/src'
make[1]: se sale del directorio '/home/jaime/git/keykit'
make copy_linux_alsa
make[1]: se entra en el directorio '/home/jaime/git/keykit'
if [ ! -d bin ] ; then mkdir bin ; fi
cp mdep/linux_alsa/mdep1.c src/mdep1.c
cp mdep/linux_alsa/mdep2.c src/mdep2.c
cp mdep/linux_alsa/mdep.h src/mdep.h
cp mdep/linux_alsa/makefile src/makefile
cp mdep/linux_alsa/bsdclock.c src/clock.c
cp mdep/linux_alsa/tjt.ico src/tjt.ico
cp mdep/linux_alsa/keykit.ico src/keykit.ico
cp mdep/linux_alsa/midi.c src/midi.c
mdep/stdio/rmcr src/*.c src/*.h src/*.ico src/makefile
mdep/stdio/rmcr lib/* tests/makefile
cp mdep/stdio/resetkeylib bin
mdep/stdio/rmcr bin/resetkeylib
chmod +x bin/resetkeylib
chmod ugo+w */keylib.k
mdep/stdio/rmcr tests/*
make[1]: se sale del directorio '/home/jaime/git/keykit'
cd src ; make install
make[1]: se entra en el directorio '/home/jaime/git/keykit/src'
gcc protoflp.c -o protoflp
gcc -m32 -O -I/usr/include/ -g   -c -o yacc.o yacc.c
gcc -m32 -O -I/usr/include/ -g   -c -o sym.o sym.c
gcc -m32 -O -I/usr/include/ -g   -c -o real.o real.c
gcc -m32 -O -I/usr/include/ -g   -c -o code.o code.c
gcc -m32 -O -I/usr/include/ -g   -c -o code2.o code2.c
gcc -m32 -O -I/usr/include/ -g   -c -o main.o main.c
gcc -m32 -O -I/usr/include/ -g   -c -o util.o util.c
gcc -m32 -O -I/usr/include/ -g   -c -o mdep1.o mdep1.c
mdep1.c: In function ‘mdep_currtime’:
mdep1.c:76:18: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration]
   76 |         return ( time((long *)0) );
      |                  ^~~~
gcc -m32 -O -I/usr/include/ -g   -c -o mfin.o mfin.c
gcc -m32 -O -I/usr/include/ -g   -c -o phrase.o phrase.c
gcc -m32 -O -I/usr/include/ -g   -c -o misc.o misc.c
gcc -m32 -O -I/usr/include/ -g   -c -o fsm.o fsm.c
gcc -m32 -O -I/usr/include/ -g   -c -o grid.o grid.c
gcc -m32 -O -I/usr/include/ -g   -c -o view.o view.c
gcc -m32 -O -I/usr/include/ -g   -c -o midi.o midi.c
gcc -m32 -O -I/usr/include/ -g   -c -o clock.o clock.c
gcc -m32 -O -I/usr/include/ -g   -c -o mdep2.o mdep2.c
mdep2.c: In function ‘mdep_screensize’:
mdep2.c:1522:3: warning: ‘return’ with no value, in function returning non-void
 1522 |   return;
      |   ^~~~~~
mdep2.c:1519:1: note: declared here
 1519 | mdep_screensize(int *x0, int *y0, int *x1, int *y1)
      | ^~~~~~~~~~~~~~~
gcc -m32 -O -I/usr/include/ -g   -c -o keyto.o keyto.c
gcc -m32 -O -I/usr/include/ -g   -c -o regex.o regex.c
gcc -m32 -O -I/usr/include/ -g   -c -o task.o task.c
gcc -m32 -O -I/usr/include/ -g   -c -o fifo.o fifo.c
gcc -m32 -O -I/usr/include/ -g   -c -o kwind.o kwind.c
gcc -m32 -O -I/usr/include/ -g   -c -o menu.o menu.c
gcc -m32 -O -I/usr/include/ -g   -c -o bltin.o bltin.c
bltin.c: In function ‘bi_midi’:
bltin.c:2166:8: warning: implicit declaration of function ‘mdep_midi’; did you mean ‘mdep_endmidi’? [-Wimplicit-function-declaration]
 2166 |    r = mdep_midi(MIDI_CLOSE_INPUT,&Midiinputs[p-1]);
      |        ^~~~~~~~~
      |        mdep_endmidi
gcc -m32 -O -I/usr/include/ -g   -c -o meth.o meth.c
gcc  -m32 -O -I/usr/include/ -g yacc.o sym.o real.o code.o code2.o main.o util.o mdep1.o mfin.o phrase.o misc.o fsm.o grid.o view.o midi.o clock.o mdep2.o keyto.o regex.o task.o fifo.o kwind.o menu.o bltin.o meth.o /usr/lib/x86_64-linux-gnu/libX11.so.6 -lm /usr/lib/x86_64-linux-gnu/libasound.so.2 -L/usr/lib/ -lpthread -ldl -o key
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libX11.so.6: error al añadir símbolos: file in wrong format
collect2: error: ld returned 1 exit status
make[1]: *** [makefile:127: key] Error 1
make[1]: se sale del directorio '/home/jaime/git/keykit/src'
make: *** [makefile:463: install_linux_alsa] Error 2

some tip to be able to compile it?

regards.

vizicist commented 4 years ago

You can ignore the warning messages, though there's one inconsequential one that I'll fix. The real problem is just the last link error, where it's trying to find the X11 library. If you can successfully compile other X11 programs, you can perhaps use that to figure out the correct library path or version for libX11.so. If you figure it out, add a note here.

trkkazulu commented 3 years ago

Was this issue ever resolved?

vizicist commented 3 years ago

Not to my knowledge. It looks like it's trying to compile all the KeyKit source code for 32-bit, but the library path (that it's complaining about) is for 64-bit.

trkkazulu commented 3 years ago

Thank you.

nosuchtim commented 3 years ago

I've now made some adjustments and compiled it successfully on 64-bit Debian - my uname -a output is:

Linux nosuchdebian 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64 GNU/Linux

The dist/key_linux.zip file has the pre-compiled Debian binaries that you can just unzip, or you should be able to compile it with:

make install_linux
nosuchtim commented 3 years ago

Fixed with commit da16a4f242d915c396f11c9b3d25a3de7d79e79f

nosuchtim commented 3 years ago

Re-open or submit a new issue if you're still having trouble.