cebix / macemu

Basilisk II and SheepShaver Macintosh emulators
1.4k stars 291 forks source link

Cannot compile due to error: ‘STR_MODELID_XX_LAB’ was not declared in this scope #194

Open graysky2 opened 4 years ago

graysky2 commented 4 years ago

Attempting to compile on Arch Linux but encountering multiple error when building.

Logs

autogen.sh options

./autogen.sh --prefix=/usr --enable-sdl-video --enable-sdl-audio --enable-jit-compiler --with-bincue --with-vdeplug

Sample of make errors

...
nclude/SDL -D_GNU_SOURCE=1 -D_REENTRANT -fno-merge-constants -fno-gcse-sm -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/libffi-3.2.1/include -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/atk-1.0 -pthread  -c ./../user_strings.cpp -o obj/user_strings.o
./../user_strings.cpp:206:3: error: ‘STR_MODELID_7_LAB’ was not declared in this scope; did you mean ‘STR_MODELID_5_LAB’?
  206 |  {STR_MODELID_7_LAB, "Mac IIfx (MacOS 7.x)"},
      |   ^~~~~~~~~~~~~~~~~
      |   STR_MODELID_5_LAB
./../user_strings.cpp:207:3: error: ‘STR_MODELID_12_LAB’ was not declared in this scope; did you mean ‘STR_MODELID_14_LAB’?
  207 |  {STR_MODELID_12_LAB, "Mac IIsi (MacOS 7.x"},
      |   ^~~~~~~~~~~~~~~~~~
      |   STR_MODELID_14_LAB
./../user_strings.cpp:208:3: error: ‘STR_MODELID_13_LAB’ was not declared in this scope; did you mean ‘STR_MODELID_14_LAB’?
  208 |  {STR_MODELID_13_LAB, "Mac LC (MacOS 7.x"},
      |   ^~~~~~~~~~~~~~~~~~
...
PacAnimal commented 4 years ago

These added models are not properly declared in user_strings.h: https://github.com/cebix/macemu/commit/00f02d9d0c47cda3ca42ef2efca29900087613c7#diff-8a62cfc29036a3b39b4ec02104a6292d

PacAnimal commented 4 years ago

Pull request with build fix: https://github.com/cebix/macemu/pull/195

probonopd commented 4 years ago

I am running into the same issue on aarch64. Thanks to your pull request I was able to build like this:

sudo apt-get install libgtk2.0-dev x11proto-xf86dga-dev libxxf86dga-dev libxxf86dga1 libsdl1.2-dev -y
cd ~/Downloads
git clone https://github.com/cebix/macemu.git
cd macemu/BasiliskII
git fetch origin +refs/pull/195/merge # apply pull request
git checkout FETCH_HEAD # apply pull request
make links
cd src/Unix/
wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O config.guess
 ./autogen.sh
make -j3

Thank you @b01t. :+1:

graysky2 commented 4 years ago

I applied the patch to the latest git commit configuring it as described above but ran into another build error:

...
g++ -D_FORTIFY_SOURCE=2 -I./../include -I./. -I. -I./../CrossPlatform -I./../uae_cpu -I./../slirp -DHAVE_CONFIG_H  -DOS_linux -DBINCUE -DDIRECT_ADDRESSING -DUNALIGNED_PROFITABLE -DX86_64_ASSEMBLY -DOPTIMIZED_FLAGS -DUSE_JIT -DUSE_JIT_FPU -DFPU_IEEE -D_REENTRANT -DDATADIR=\"/usr/share/BasiliskII\" -march=x86-64 -O2 -pipe -fno-plt -fdiagnostics-color -I../../../cxmon/src -I../../../cxmon/src/disass -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -fno-merge-constants -fno-gcse-sm -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/atk-1.0 -pthread  -c user_strings_unix.cpp -o obj/user_strings_unix.o
gcc -D_FORTIFY_SOURCE=2 -I./../include -I./. -I. -I./../CrossPlatform -I./../uae_cpu -I./../slirp -DHAVE_CONFIG_H  -DOS_linux -DBINCUE -DDIRECT_ADDRESSING -DUNALIGNED_PROFITABLE -DX86_64_ASSEMBLY -DOPTIMIZED_FLAGS -DUSE_JIT -DUSE_JIT_FPU -DFPU_IEEE -D_REENTRANT -DDATADIR=\"/usr/share/BasiliskII\" -march=x86-64 -O2 -pipe -fno-plt -fdiagnostics-color -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c sshpty.c -o obj/sshpty.o
sshpty.c: In function ‘pty_allocate’:
sshpty.c:190:20: error: ‘I_PUSH’ undeclared (first use in this function)
  190 |  if (ioctl(*ttyfd, I_PUSH, "ptem") < 0)
      |                    ^~~~~~
sshpty.c:190:20: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:192: obj/sshpty.o] Error 1

Full build log. Thoughts?