PDP-10 / its

Incompatible Timesharing System
Other
857 stars 81 forks source link

Having problems compiling ITS #2322

Closed drforbin closed 1 month ago

drforbin commented 2 months ago

Using latest gentoo install.

gcc -std=gnu99 -U__STRICT_ANSI__ -O2 -DNDEBUG=1 -finline-functions -fgcse-after-reload -fpredictive-commoning -fipa-cp-clone -fno-unsafe-loop-optimizations -fno-strict-overflow -DSIM_GIT_COMMIT_ID=348f5f294415202350a2fa80a839f3cd8e4a6e3f -DSIM_GIT_COMMIT_TIME=2023-07-31T10:34:33-0700 -DSIM_COMPILER="GCC Version: 13.3.1" -DSIM_BUILD_TOOL=simh-makefile -I . -Werror -D_GNU_SOURCE -DUSE_READER_THREAD -DSIM_ASYNCH_IO -DHAVE_PCRE_H -DHAVE_SEMAPHORE -DHAVE_SYS_IOCTL -DHAVE_LINUX_CDROM -DSIM_HAVE_DLOPEN=so -DHAVE_EDITLINE -DHAVE_UTIME -DHAVE_LIBPNG -DHAVE_ZLIB -DHAVE_GLOB -DHAVE_SHM_OPEN ./imlac/imlac_sys.c ./imlac/imlac_cpu.c ./imlac/imlac_dp.c ./imlac/imlac_crt.c ./imlac/imlac_kbd.c ./imlac/imlac_tty.c ./imlac/imlac_pt.c ./imlac/imlac_bel.c ./display/display.c ./display/sim_ws.c ./scp.c ./sim_console.c ./sim_fio.c ./sim_timer.c ./sim_sock.c ./sim_tmxr.c ./sim_ether.c ./sim_tape.c ./sim_disk.c ./sim_serial.c ./sim_video.c ./sim_imd.c ./sim_card.c -I ./imlac -DUSE_DISPLAY -DHAVE_LIBSDL -DUSE_SIM_VIDEO sdl2-config --cflags sdl2-config --libs -o BIN/imlac -lm -lrt -lpthread -lpcre -ldl -ledit -lpng -lz BIN/imlac RegisterSanityCheck </dev/null Running internal register sanity checks on Imlac simulator. Good Registers in Imlac simulator. make[1]: Leaving directory '/home/mercou/Documents/sims/its/tools/simh' mkdir -p out/pdp10-ka/stamp touch out/pdp10-ka/stamp/emulators make -C tools/supdup make[1]: Entering directory '/home/mercou/Documents/sims/its/tools/supdup' cc -g -Wall -c -o supdup.o supdup.c cc -g -Wall -c -o charmap.o charmap.c cc -g -Wall -c -o tcp.o tcp.c cc -g -Wall -c -o chaos.o chaos.c cc -g -o supdup supdup.o charmap.o tcp.o chaos.o -lncurses /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: supdup.o: undefined reference to symbol 'cur_term' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /lib64/libtinfo.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[1]: [Makefile:24: supdup] Error 1 make[1]: Leaving directory '/home/mercou/Documents/sims/its/tools/supdup' make: *** [Makefile:411: tools/supdup/supdup] Error 2

ams commented 2 months ago

Can you double check that the macro cur_term is defined in curses.h on your system?

larsbrinkhoff commented 2 months ago

This sometimes happen when you rebuild in a previously built tree. The problem is usually resolved by ensuring all submodules are up-to-date and clean. Do something like this:

  1. git submodule sync --recursive
  2. git submodule update --recursive --init
  3. git submodule foreach --recursive make clean
ams commented 2 months ago

This sometimes happen when you rebuild in a previously built tree. The problem is usually resolved by ensuring all submodules are up-to-date and clean. Do something like this:

  1. git submodule sync --recursive
  2. git submodule update --recursive --init
  3. git submodule foreach --recursive make clean

I suspect that point 3 is solves the issue indirectly, since it will nuke all built artifacts. Just running make clean in supdup should do the same; but it is weird that this happens .. cur_term is a macro, so it should already be expanded at some point or something...

drforbin commented 2 months ago

fine. but it did the same thing on build from clean clone

drforbin commented 2 months ago

cur_term is defined in term.h in /usr/include

ams commented 2 months ago

Can you try doing something like:

cd /home/mercou/Documents/sims/its/tools/supdup
make clean
make all

This should result in the same error, I hope. If it does, canyon then try doing, maybe:

cc -g -o supdup supdup.o charmap.o tcp.o chaos.o -lncurses -ltinfo
drforbin commented 2 months ago

I did it. it compiled properly. tfinfo lib had to be added?

ams commented 1 month ago

Seems like it, there are cases that escape me where -lcurses AND -ltinfo need to be passed. Why I don't recall. Maybe this can be fixed somehow, @larsbrinkhoff ?

drforbin commented 1 month ago

Well, do you want me to add the lib and post a pull request? or you do it?

larsbrinkhoff commented 1 month ago

This is a matter for https://github.com/PDP-10/supdup, and when that's resolved we'll pick up the new version in #2321. I'm closing this issue; let's move further discussion to the supudp repository.

drforbin commented 1 month ago

Do you guys want me to update the make file and do A pull request?

ams commented 1 month ago

Not sure what you mean? Are you confusing this with PDP-10/supdup#35 ?

drforbin commented 1 month ago

Well I had problem building. It was found that the tinfo lib was required. I added this to the make file and I wanted to know if you all wanted me to fix the rep and you all do a pull?

larsbrinkhoff commented 1 month ago

Thank's for offering @drforbin, but adding tinfo is already being adressed in the pull request @ams referred to. So it should be fixed soon.

drforbin commented 1 month ago

oh ok. I had done a pull a few days ago and the fix was not in.