Compiling Mini vMac with sound on Linux Mint.

About Mini vMac and all other 68k emulators, including SoftMac, Executor, and MESS.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
facetoe
Space Cadet
Posts: 2
Joined: Tue Nov 26, 2013 9:04 am

Compiling Mini vMac with sound on Linux Mint.

Post by facetoe »

Hello, I'm trying to compile Mini vMac with sound on Linux Mint but am having some trouble. I have used the build program in Mini vMac to generate the appropriate files with the following config:

-t lx64
-sound 1
-e bgc

However when I try to build the program I run into lots of errors:
⇒ make
gcc "src/MYOSGLUE.c" -o "bld/MYOSGLUE.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
src/MYOSGLUE.c: In function ‘MySound_Init0’:
src/MYOSGLUE.c:2079:3: warning: ‘snd_pcm_sw_params_set_xfer_align’ is deprecated (declared at /usr/include/alsa/pcm.h:1135) [-Wdeprecated-declarations]
src/MYOSGLUE.c: In function ‘vSonyTransfer’:
src/MYOSGLUE.c:494:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
gcc "src/GLOBGLUE.c" -o "bld/GLOBGLUE.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
gcc "src/M68KITAB.c" -o "bld/M68KITAB.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
gcc "src/MINEM68K.c" -o "bld/MINEM68K.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
gcc "src/VIAEMDEV.c" -o "bld/VIAEMDEV.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
gcc "src/IWMEMDEV.c" -o "bld/IWMEMDEV.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
gcc "src/SCCEMDEV.c" -o "bld/SCCEMDEV.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
gcc "src/RTCEMDEV.c" -o "bld/RTCEMDEV.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
gcc "src/ROMEMDEV.c" -o "bld/ROMEMDEV.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
gcc "src/SCSIEMDV.c" -o "bld/SCSIEMDV.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
gcc "src/SONYEMDV.c" -o "bld/SONYEMDV.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
gcc "src/SCRNEMDV.c" -o "bld/SCRNEMDV.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
gcc "src/KBRDEMDV.c" -o "bld/KBRDEMDV.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
gcc "src/SNDEMDEV.c" -o "bld/SNDEMDEV.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
gcc "src/MOUSEMDV.c" -o "bld/MOUSEMDV.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
gcc "src/PROGMAIN.c" -o "bld/PROGMAIN.o" -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Os
gcc \
-o "minivmac" -L/usr/X11R6/lib -lXext -lX11 -lasound \
bld/MYOSGLUE.o bld/GLOBGLUE.o bld/M68KITAB.o bld/MINEM68K.o bld/VIAEMDEV.o bld/IWMEMDEV.o bld/SCCEMDEV.o bld/RTCEMDEV.o bld/ROMEMDEV.o bld/SCSIEMDV.o bld/SONYEMDV.o bld/SCRNEMDV.o bld/KBRDEMDV.o bld/SNDEMDEV.o bld/MOUSEMDV.o bld/PROGMAIN.o
bld/MYOSGLUE.o: In function `KC2MKCAssignOne':
MYOSGLUE.c:(.text+0x3a4): undefined reference to `XKeysymToKeycode'
bld/MYOSGLUE.o: In function `MyMoveMouse':
MYOSGLUE.c:(.text+0x4d1): undefined reference to `XWarpPointer'
MYOSGLUE.c:(.text+0x515): undefined reference to `XQueryPointer'
bld/MYOSGLUE.o: In function `CloseMainWindow':
MYOSGLUE.c:(.text+0x651): undefined reference to `XFreeGC'
MYOSGLUE.c:(.text+0x674): undefined reference to `XDestroyWindow'
bld/MYOSGLUE.o: In function `MyUnGrabKeyboard':
MYOSGLUE.c:(.text+0x6a3): undefined reference to `XUngrabKeyboard'
bld/MYOSGLUE.o: In function `DisableKeyRepeat.part.5':
MYOSGLUE.c:(.text+0x896): undefined reference to `XGetKeyboardControl'
MYOSGLUE.c:(.text+0x8be): undefined reference to `XChangeKeyboardControl'
bld/MYOSGLUE.o: In function `RestoreKeyRepeat.part.6':
MYOSGLUE.c:(.text+0x909): undefined reference to `XChangeKeyboardControl'
bld/MYOSGLUE.o: In function `MySound_FilledBlocks':
MYOSGLUE.c:(.text+0xb03): undefined reference to `snd_pcm_state'
MYOSGLUE.c:(.text+0xb26): undefined reference to `snd_pcm_prepare'
MYOSGLUE.c:(.text+0xb31): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text+0xb4a): undefined reference to `snd_pcm_start'
MYOSGLUE.c:(.text+0xb55): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text+0xb6e): undefined reference to `snd_pcm_resume'
MYOSGLUE.c:(.text+0xb7d): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text+0xbb1): undefined reference to `snd_pcm_delay'
MYOSGLUE.c:(.text+0xbbc): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text+0xbd5): undefined reference to `snd_pcm_avail_update'
MYOSGLUE.c:(.text+0xbe1): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text+0xcba): undefined reference to `snd_pcm_writei'
MYOSGLUE.c:(.text+0xcd8): undefined reference to `snd_strerror'
bld/MYOSGLUE.o: In function `CreateMainWindow':
MYOSGLUE.c:(.text+0x10d0): undefined reference to `XRootWindow'
MYOSGLUE.c:(.text+0x1113): undefined reference to `XGetGeometry'
MYOSGLUE.c:(.text+0x1241): undefined reference to `XSelectInput'
MYOSGLUE.c:(.text+0x1259): undefined reference to `XStoreName'
MYOSGLUE.c:(.text+0x1271): undefined reference to `XSetIconName'
MYOSGLUE.c:(.text+0x1276): undefined reference to `XAllocClassHint'
MYOSGLUE.c:(.text+0x12a3): undefined reference to `XSetClassHint'
MYOSGLUE.c:(.text+0x12ab): undefined reference to `XFree'
MYOSGLUE.c:(.text+0x12b0): undefined reference to `XAllocWMHints'
MYOSGLUE.c:(.text+0x12e3): undefined reference to `XSetWMHints'
MYOSGLUE.c:(.text+0x12eb): undefined reference to `XFree'
MYOSGLUE.c:(.text+0x130b): undefined reference to `XSetCommand'
MYOSGLUE.c:(.text+0x1328): undefined reference to `XSetWMProtocols'
MYOSGLUE.c:(.text+0x1361): undefined reference to `XChangeProperty'
MYOSGLUE.c:(.text+0x1378): undefined reference to `XCreateGC'
MYOSGLUE.c:(.text+0x13af): undefined reference to `XSetState'
MYOSGLUE.c:(.text+0x13bd): undefined reference to `XAllocSizeHints'
MYOSGLUE.c:(.text+0x13ff): undefined reference to `XSetWMNormalHints'
MYOSGLUE.c:(.text+0x1407): undefined reference to `XFree'
MYOSGLUE.c:(.text+0x1446): undefined reference to `XMapRaised'
MYOSGLUE.c:(.text+0x14cf): undefined reference to `XCreateWindow'
MYOSGLUE.c:(.text+0x152a): undefined reference to `XCreateSimpleWindow'
bld/MYOSGLUE.o: In function `CheckMouseState':
MYOSGLUE.c:(.text+0x1764): undefined reference to `XQueryPointer'
bld/MYOSGLUE.o: In function `HaveChangedScreenBuff':
MYOSGLUE.c:(.text+0x2111): undefined reference to `XPutImage'
bld/MYOSGLUE.o: In function `Keyboard_UpdateKeyMap2':
MYOSGLUE.c:(.text+0x2435): undefined reference to `XRootWindow'
MYOSGLUE.c:(.text+0x2475): undefined reference to `XGetGeometry'
bld/MYOSGLUE.o: In function `CheckTheCapsLock':
MYOSGLUE.c:(.text+0x26be): undefined reference to `XQueryPointer'
bld/MYOSGLUE.o: In function `WaitForTheNextEvent':
MYOSGLUE.c:(.text+0x2732): undefined reference to `XNextEvent'
MYOSGLUE.c:(.text+0x2a5e): undefined reference to `XChangeProperty'
MYOSGLUE.c:(.text+0x2bcc): undefined reference to `XGetWindowProperty'
MYOSGLUE.c:(.text+0x2c6e): undefined reference to `XFree'
MYOSGLUE.c:(.text+0x2c88): undefined reference to `XDeleteProperty'
MYOSGLUE.c:(.text+0x2d1f): undefined reference to `XSendEvent'
MYOSGLUE.c:(.text+0x2d60): undefined reference to `XRootWindow'
MYOSGLUE.c:(.text+0x2dbb): undefined reference to `XGetWindowProperty'
MYOSGLUE.c:(.text+0x2df8): undefined reference to `XFree'
MYOSGLUE.c:(.text+0x2e12): undefined reference to `XRootWindow'
MYOSGLUE.c:(.text+0x2e8f): undefined reference to `XSendEvent'
MYOSGLUE.c:(.text+0x2ea2): undefined reference to `XRaiseWindow'
MYOSGLUE.c:(.text+0x2ebd): undefined reference to `XSetInputFocus'
MYOSGLUE.c:(.text+0x2f51): undefined reference to `XGetGeometry'
MYOSGLUE.c:(.text+0x3004): undefined reference to `XSendEvent'
MYOSGLUE.c:(.text+0x3049): undefined reference to `XConvertSelection'
bld/MYOSGLUE.o: In function `HTCEexport':
MYOSGLUE.c:(.text+0x378b): undefined reference to `XSetSelectionOwner'
bld/MYOSGLUE.o: In function `HTCEimport':
MYOSGLUE.c:(.text+0x37d2): undefined reference to `XGetSelectionOwner'
MYOSGLUE.c:(.text+0x380e): undefined reference to `XDeleteProperty'
MYOSGLUE.c:(.text+0x3837): undefined reference to `XConvertSelection'
MYOSGLUE.c:(.text+0x3867): undefined reference to `XCheckTypedWindowEvent'
MYOSGLUE.c:(.text+0x3914): undefined reference to `XGetWindowProperty'
MYOSGLUE.c:(.text+0x3985): undefined reference to `XFree'
MYOSGLUE.c:(.text+0x399f): undefined reference to `XDeleteProperty'
bld/MYOSGLUE.o: In function `MySound_Stop':
MYOSGLUE.c:(.text+0x585): undefined reference to `snd_pcm_drop'
bld/MYOSGLUE.o: In function `ForceShowCursor':
MYOSGLUE.c:(.text+0x9bd): undefined reference to `XUndefineCursor'
bld/MYOSGLUE.o: In function `main':
MYOSGLUE.c:(.text.startup+0x350): undefined reference to `snd_pcm_open'
MYOSGLUE.c:(.text.startup+0x35b): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x397): undefined reference to `snd_pcm_hw_params_malloc'
MYOSGLUE.c:(.text.startup+0x3a2): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x3dc): undefined reference to `snd_pcm_hw_params_any'
MYOSGLUE.c:(.text.startup+0x3e7): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x40a): undefined reference to `snd_pcm_hw_params_set_access'
MYOSGLUE.c:(.text.startup+0x415): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x438): undefined reference to `snd_pcm_hw_params_set_format'
MYOSGLUE.c:(.text.startup+0x443): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x468): undefined reference to `snd_pcm_hw_params_set_rate_near'
MYOSGLUE.c:(.text.startup+0x473): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x496): undefined reference to `snd_pcm_hw_params_set_channels'
MYOSGLUE.c:(.text.startup+0x4a1): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x4c4): undefined reference to `snd_pcm_hw_params_set_buffer_size_near'
MYOSGLUE.c:(.text.startup+0x4cf): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x4f4): undefined reference to `snd_pcm_hw_params_set_period_size_near'
MYOSGLUE.c:(.text.startup+0x4ff): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x51d): undefined reference to `snd_pcm_hw_params'
MYOSGLUE.c:(.text.startup+0x528): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x569): undefined reference to `snd_pcm_hw_params_free'
MYOSGLUE.c:(.text.startup+0x57c): undefined reference to `snd_pcm_sw_params_malloc'
MYOSGLUE.c:(.text.startup+0x587): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x5c1): undefined reference to `snd_pcm_sw_params_current'
MYOSGLUE.c:(.text.startup+0x5ce): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x5fa): undefined reference to `snd_pcm_sw_params_set_start_threshold'
MYOSGLUE.c:(.text.startup+0x605): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x627): undefined reference to `snd_pcm_sw_params_set_avail_min'
MYOSGLUE.c:(.text.startup+0x632): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x652): undefined reference to `snd_pcm_sw_params_set_xfer_align'
MYOSGLUE.c:(.text.startup+0x65d): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x678): undefined reference to `snd_pcm_sw_params'
MYOSGLUE.c:(.text.startup+0x683): undefined reference to `snd_strerror'
MYOSGLUE.c:(.text.startup+0x6aa): undefined reference to `snd_pcm_sw_params_free'
MYOSGLUE.c:(.text.startup+0x6c1): undefined reference to `snd_pcm_nonblock'
MYOSGLUE.c:(.text.startup+0x6d2): undefined reference to `snd_pcm_sw_params_free'
MYOSGLUE.c:(.text.startup+0x6e1): undefined reference to `snd_pcm_hw_params_free'
MYOSGLUE.c:(.text.startup+0x6f2): undefined reference to `snd_pcm_close'
MYOSGLUE.c:(.text.startup+0x709): undefined reference to `XOpenDisplay'
MYOSGLUE.c:(.text.startup+0x736): undefined reference to `XRootWindow'
MYOSGLUE.c:(.text.startup+0x762): undefined reference to `XInternAtom'
MYOSGLUE.c:(.text.startup+0x77c): undefined reference to `XInternAtom'
MYOSGLUE.c:(.text.startup+0x796): undefined reference to `XInternAtom'
MYOSGLUE.c:(.text.startup+0x7b0): undefined reference to `XInternAtom'
MYOSGLUE.c:(.text.startup+0x7ca): undefined reference to `XInternAtom'
bld/MYOSGLUE.o:MYOSGLUE.c:(.text.startup+0x7e4): more undefined references to `XInternAtom' follow
bld/MYOSGLUE.o: In function `main':
MYOSGLUE.c:(.text.startup+0x93c): undefined reference to `XParseColor'
MYOSGLUE.c:(.text.startup+0x950): undefined reference to `XAllocColor'
MYOSGLUE.c:(.text.startup+0x969): undefined reference to `XParseColor'
MYOSGLUE.c:(.text.startup+0x97d): undefined reference to `XAllocColor'
MYOSGLUE.c:(.text.startup+0x99c): undefined reference to `XCreatePixmap'
MYOSGLUE.c:(.text.startup+0x9cf): undefined reference to `XCreateGC'
MYOSGLUE.c:(.text.startup+0x9fb): undefined reference to `XFillRectangle'
MYOSGLUE.c:(.text.startup+0xa0d): undefined reference to `XFreeGC'
MYOSGLUE.c:(.text.startup+0xa34): undefined reference to `XCreatePixmapCursor'
MYOSGLUE.c:(.text.startup+0xa56): undefined reference to `XFreePixmap'
MYOSGLUE.c:(.text.startup+0xada): undefined reference to `XCreateImage'
MYOSGLUE.c:(.text.startup+0xb50): undefined reference to `XCreateImage'
MYOSGLUE.c:(.text.startup+0xbd5): undefined reference to `XCreateImage'
MYOSGLUE.c:(.text.startup+0x15a1): undefined reference to `XKeysymToKeycode'
MYOSGLUE.c:(.text.startup+0x15fb): undefined reference to `XEventsQueued'
MYOSGLUE.c:(.text.startup+0x160f): undefined reference to `XFlush'
MYOSGLUE.c:(.text.startup+0x1677): undefined reference to `XSetInputFocus'
MYOSGLUE.c:(.text.startup+0x168b): undefined reference to `XRootWindow'
MYOSGLUE.c:(.text.startup+0x169c): undefined reference to `XSync'
MYOSGLUE.c:(.text.startup+0x16cf): undefined reference to `XTranslateCoordinates'
MYOSGLUE.c:(.text.startup+0x18a6): undefined reference to `XQueryKeymap'
MYOSGLUE.c:(.text.startup+0x19b2): undefined reference to `XRaiseWindow'
MYOSGLUE.c:(.text.startup+0x19cc): undefined reference to `XSetInputFocus'
MYOSGLUE.c:(.text.startup+0x1a61): undefined reference to `XRootWindow'
MYOSGLUE.c:(.text.startup+0x1aa2): undefined reference to `XGetGeometry'
MYOSGLUE.c:(.text.startup+0x1ab0): undefined reference to `XSync'
MYOSGLUE.c:(.text.startup+0x1ade): undefined reference to `XTranslateCoordinates'
MYOSGLUE.c:(.text.startup+0x1c03): undefined reference to `XGetSelectionOwner'
MYOSGLUE.c:(.text.startup+0x1c3f): undefined reference to `XSetSelectionOwner'
MYOSGLUE.c:(.text.startup+0x1d23): undefined reference to `XGrabKeyboard'
MYOSGLUE.c:(.text.startup+0x1ebd): undefined reference to `XDefineCursor'
MYOSGLUE.c:(.text.startup+0x1ed2): undefined reference to `XUndefineCursor'
MYOSGLUE.c:(.text.startup+0x213e): undefined reference to `snd_pcm_close'
MYOSGLUE.c:(.text.startup+0x21b1): undefined reference to `XFreeCursor'
MYOSGLUE.c:(.text.startup+0x21fd): undefined reference to `XCloseDisplay'
collect2: error: ld returned 1 exit status
make: *** [minivmac] Error 1

It seems I don't have the X11R6 library:

⇒ ls /usr/X11R6/lib
ls: cannot access /usr/X11R6/lib: No such file or directory

Does anyone know how I can fix this issue?
facetoe
Space Cadet
Posts: 2
Joined: Tue Nov 26, 2013 9:04 am

Re: Compiling Mini vMac with sound on Linux Mint.

Post by facetoe »

In case anyone else has this issue, here is how I fixed it. I changed this part of the Makefile:

Code: Select all

minivmac : $(ObjFiles)
    gcc \
        -o "minivmac" -L/usr/lib -lXext -lX11 -lasound \
        $(ObjFiles)
To:

Code: Select all

minivmac : $(ObjFiles)
        gcc \
                -o "minivmac" \
                -L/usr/lib/x86_64-linux-gnu $(ObjFiles) -lXext -lX11 -lasound
And it works!
User avatar
adespoton
Forum All-Star
Posts: 4277
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Compiling Mini vMac with sound on Linux Mint.

Post by adespoton »

From that, it looks like you may have path issues with your lib -- but if you're using default Mint, that's going to be a problem for everyone else too -- so thanks :)
Post Reply