kevinlawler / kona

Open-source implementation of the K programming language
ISC License
1.36k stars 138 forks source link

Fedora compiler upgrade #591

Closed tavmem closed 4 years ago

tavmem commented 4 years ago

One of the environments that I use is Fedora. Due to a recent “upgrades” Kona no longer builds successfully on Fedora 32.

$ cd kona
$ touch src/*.c
$ make
cc -g -pthread -O3    -c -o src/0.o src/0.c
cc -g -pthread -O3    -c -o src/bswap.o src/bswap.c
cc -g -pthread -O3    -c -o src/c.o src/c.c
cc -g -pthread -O3    -c -o src/getline.o src/getline.c
cc -g -pthread -O3    -c -o src/mt.o src/mt.c
cc -g -pthread -O3    -c -o src/p.o src/p.c
cc -g -pthread -O3    -c -o src/r.o src/r.c
cc -g -pthread -O3    -c -o src/k.o src/k.c
cc -g -pthread -O3    -c -o src/kc.o src/kc.c
cc -g -pthread -O3    -c -o src/kx.o src/kx.c
src/kx.c: In function ‘ex’:
cc1: warning: function may return address of local variable [-Wreturn-local-addr]
src/kx.c:599:8: note: declared here
  599 | K ex(K a)   //Input is (usually, but not always) 7-0 type from wd()
      |      ~~^
src/kx.c:599:8: note: declared here
src/kx.c: In function ‘ex1’:
cc1: warning: function may return address of local variable [-Wreturn-local-addr]
src/kx.c:778:7: note: declared here
  778 |     K a=Kv(); a->n=0; K kb=newK(-4,d); M(a,kb)  V*b=(V*)kK(kb);
      |       ^
src/kx.c:778:7: note: declared here
cc -g -pthread -O3    -c -o src/kg.o src/kg.c
cc -g -pthread -O3    -c -o src/km.o src/km.c
cc -g -pthread -O3    -c -o src/kn.o src/kn.c
cc -g -pthread -O3    -c -o src/ko.o src/ko.c
cc -g -pthread -O3    -c -o src/ks.o src/ks.c
cc -g -pthread -O3    -c -o src/v.o src/v.c
cc -g -pthread -O3    -c -o src/va.o src/va.c
cc -g -pthread -O3    -c -o src/vc.o src/vc.c
cc -g -pthread -O3    -c -o src/vd.o src/vd.c
cc -g -pthread -O3    -c -o src/vf.o src/vf.c
cc -g -pthread -O3    -c -o src/vg.o src/vg.c
cc -g -pthread -O3    -c -o src/vq.o src/vq.c
cc -g -pthread -O3    -c -o src/main.o src/main.c
cc -g -pthread -O3  src/0.o src/bswap.o src/c.o src/getline.o src/mt.o src/p.o src/r.o src/k.o src/kc.o src/kx.o src/kg.o src/km.o src/kn.o src/ko.o src/ks.o src/v.o src/va.o src/vc.o src/vd.o src/vf.o src/vg.o src/vq.o src/main.o -o k -lm -ldl
/usr/bin/ld: src/kc.o:(.bss+0x1138): multiple definition of `KONA_GSET'; src/k.o:(.bss+0x218): first defined here
/usr/bin/ld: src/kc.o:(.bss+0x1130): multiple definition of `KONA_IDX'; src/k.o:(.bss+0x210): first defined here
/usr/bin/ld: src/vd.o:(.bss+0x8): multiple definition of `KONA_GSET'; src/k.o:(.bss+0x218): first defined here
/usr/bin/ld: src/vd.o:(.bss+0x0): multiple definition of `KONA_IDX'; src/k.o:(.bss+0x210): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:111: k] Error 1
$