Page 2 of 2

Re: LPD printer@Mountain Lion won't connect to Print66@SS

Posted: Fri Jun 02, 2017 10:33 pm
by mabam
I suppose you mean the VM with A2SERVER. I agree with you. But I like to find out different possibilities for different purposes.

For the use case you described the VM is perfect.
For my use case the Banana Pi AppleTalk NAS is perfect.
For someone who only needs AppleTalk for printing on an old printer from one machine I suppose SheepShaver is a perfect relatively light-weight print server solution.
I guess for someone running that one old software license requiring e.g., Mac OS 9.1 or OS X 10.3 on QEMU on a stand-alone host, having access to a shared folder via the "network" would be a practical solution.


That's why I try to contribute more possibilities next to what others here have figured out in the past.

Re: LPD printer@Mountain Lion won't connect to Print66@SS

Posted: Sat Jun 03, 2017 5:06 am
by Cat_7
having access to a shared folder via the "network" would be a practical solution.
Have you seen an tried this?:

http://www.emaculation.com/forum/viewto ... =34&t=9342

It doesn't fully work as advertised yet, but Mark Cave-Ayland suggested he would look into it if there is demand.

Best,
Cat_7

Re: LPD printer@Mountain Lion won't connect to Print66@SS

Posted: Sat Jun 03, 2017 10:10 am
by Cat_7
I've given up on trying to get SheepShaver to use the tap device in Sierra.
I can't even run it as root to enable the tap. I get a killed 9 error trying to run the app inside the bundle, even though the SheepShaver app itself runs. System protection is off.

I also haven't been able to get appletalk running between two instances of qemu with 9.1 and 9.2.


Best,
Cat_7

Re: LPD printer@Mountain Lion won't connect to Print66@SS

Posted: Sun Jun 04, 2017 4:05 am
by adespoton
Even with SIP disabled, Sierra doesn't allow non-system processes to mess with /dev -- are you running SheepShaver as root?

I wonder if you need to give the SheepShaver process group privs to something like wheel in order to let it access tap0. Might be worth seeing how VirtualBox does it (although I've been having some problems with vbox and fusion in Sierra too).

Re: LPD printer@Mountain Lion won't connect to Print66@SS

Posted: Sun Jun 04, 2017 6:49 am
by Cat_7
are you running SheepShaver as root
Certainly, otherwise the tap device doesn't get created.
SheepShaver runs under the normal user, but I cannot get the actual program inside the bundle to run as root. It gives error 9, the same error that occurs when users first try to run SheepShaver on Sierra. However, moving the program outside the bundle and back in doesn't solve this issue.

But I also couldn't get Qemu to exchange Appletalk between two OS 9 instances.
Not with the built-in bridge, nor with our set of commands in all variations (with and without static IP addresses). I also tried tap-up and tap-down scripts.

Using the built-in bridging capabitily, I manually assigned an IP address to en0, the bridge, and OS 9 in running in Qemu. PPC OSX instances do communicate with the host without a problem, I can share folders.
I can also access shares from and to Mac OS 9 when using afp over tcp/ip. It is only Appletalk that doesn't get picked up somehow. I see appletalk traffic (e.g. file server and laserwriter advertisements) on another machine running PPC Leopard.
With this configuration I can also ping a qemu OS 9 instance from the host and another machine.

EDIT: I have to correct some of that: after some 20 minutes of idling finally an Appletalk server appeared in the Chooser in 9.2 in Qemu. This was another machine running PPC 10.4. I could connect and all sharing appeared OK. So it seems Qemu can use Appletalk afterall, but why this delay happens is beyond me.
I've seen this before with SheepShaver and sometimes running tcpdump got stuff going...

Best,
Cat_7

Re: LPD printer@Mountain Lion won't connect to Print66@SS

Posted: Sun Jun 04, 2017 10:00 pm
by mabam
Cat_7 wrote:
having access to a shared folder via the "network" would be a practical solution.
Have you seen an tried this?:
http://www.emaculation.com/forum/viewto ... =34&t=9342
It doesn't fully work as advertised yet, but Mark Cave-Ayland suggested he would look into it if there is demand.
Yes, I had read it and no, I didn't try it. Due to capacity limitations I had deleted your QEMU test build I spoke about a few posts earlier and the download link is dead now (and I don't know whether that feature was already there back then).

When I follow the Qemu setup guide, on Mountain Lion the present official source build (19-05-2017) fails at creating a disk image using qemu-img:

Code: Select all

$ /Applications/Qemu/Qemu-64Bit-OSX-19052017/qemu-img create -f raw -o size=15G Tiger.img
dyld: Library not loaded: /usr/local/opt/pcre/lib/libpcre.1.dylib
  Referenced from: /Applications/Qemu/Qemu-64Bit-OSX-19052017/Libs/libgthread-2.0.0.dylib
  Reason: image not found
Trace/BPT trap: 5
Where can I obtain that lib?

Re: LPD printer@Mountain Lion won't connect to Print66@SS

Posted: Sun Jun 04, 2017 10:23 pm
by Cat_7
Seems I didn't patch libgthread correctly and did not include that libpcre.
It takes some care to patch all those lib dependencies when you also have them installed on your machine.

I'll take a look tomorrow.

Best,
Cat_7

Re: LPD printer@Mountain Lion won't connect to Print66@SS

Posted: Mon Jun 05, 2017 3:56 am
by adespoton
I remember a similar issue when we were debugging the network stack in Shoebill; in that case, because Appletalk uses sockets directly, there was an issue with the type of buffer Appletalk sets up, which is different than the buffer TCP uses. No data was processed upstream until the Appletalk buffer was full, and it doesn't send enough in the initial packet sequence to fill the buffer. The solution was to fill the buffer with null packets after a set delay in the boot sequence. After that, the issue seemed to go away, as Appletalk could set its own window size to manage buffer contents and I/O processing.

It could be that something similar is going on here....

Re: LPD printer@Mountain Lion won't connect to Print66@SS

Posted: Mon Jun 05, 2017 8:13 am
by Cat_7

Code: Select all

$ /Applications/Qemu/Qemu-64Bit-OSX-19052017/qemu-img create -f raw -o size=15G Tiger.img
dyld: Library not loaded: /usr/local/opt/pcre/lib/libpcre.1.dylib
  Referenced from: /Applications/Qemu/Qemu-64Bit-OSX-19052017/Libs/libgthread-2.0.0.dylib
  Reason: image not found
Trace/BPT trap: 5

Should be fixed now, can you try?

Best,
Cat_7

Re: LPD printer@Mountain Lion won't connect to Print66@SS

Posted: Tue Jun 06, 2017 1:14 pm
by mabam
This is what I get now:

Code: Select all

$ /Applications/Qemu/Qemu-64Bit-OSX-19052017/qemu-img create -f raw -o size=15G Tiger.img
dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
  Referenced from: /Applications/Qemu/Qemu-64Bit-OSX-19052017/qemu-img
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _clock_gettime
  Referenced from: /Applications/Qemu/Qemu-64Bit-OSX-19052017/qemu-img
  Expected in: /usr/lib/libSystem.B.dylib

Trace/BPT trap: 5
/usr/lib/libSystem.B.dylib exists, but maybe it's an older version on Mountain Lion?

Re: LPD printer@Mountain Lion won't connect to Print66@SS

Posted: Tue Jun 06, 2017 2:08 pm
by Cat_7
Ah, so it seems.
The latest build is from a fully updated Sierra.

You can perhaps use one of the older builds provided to create a disk image?

Best,
Cat_7

Re: LPD printer@Mountain Lion won't connect to Print66@SS

Posted: Sun Jun 11, 2017 7:25 pm
by mabam
Using qemu-img from the qemu-system-ppc-wip-16082016 build worked for creating the disk image.

However, when I then try to start the Qemu-64Bit-OSX-19052017 build using qemu.command, I basically get the same message again:

Code: Select all

/Applications/Qemu/Qemu-64Bit-OSX-19052017/qemu.command ; exit;
dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
  Referenced from: /Applications/Qemu/Qemu-64Bit-OSX-19052017/./qemu-system-ppc
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _clock_gettime
  Referenced from: /Applications/Qemu/Qemu-64Bit-OSX-19052017/./qemu-system-ppc
  Expected in: /usr/lib/libSystem.B.dylib

/Applications/Qemu/Qemu-64Bit-OSX-19052017/qemu.command: line 4:  1186 Trace/BPT trap: 5       ./qemu-system-ppc -L pc-bios -boot d -M mac99 -m 256 -prom-env 'auto-boot?=true' -prom-env
/Applications/Qemu/Qemu-64Bit-OSX-19052017/qemu.command: line 5: boot-args=-v: command not found
So the QEMU system itself also requires the newer version of libSystem.B.dylib.

Re: LPD printer@Mountain Lion won't connect to Print66@SS

Posted: Sun Jun 11, 2017 9:08 pm
by Cat_7
That is most unfortunate. I have no earlier OS X installations to build on.

Best,
Cat_7

Re: LPD printer@Mountain Lion won't connect to Print66@SS

Posted: Tue Jun 13, 2017 9:49 pm
by mabam
Cat_7 wrote:That is most unfortunate. I have no earlier OS X installations to build on.

Best,
Cat_7
On Jun 02, mabam wrote:If this only makes a difference for SheepShaver and not for QEMU, it might make sense to either
- add it as an alternative way to the AppleTalk for SheepShaver/Basilisk II for OS X guide,
or
- add it to my SheepShaver as virtual print server for AppleTalk-only printers guide.
On Jun 04, Cat_7 wrote:SheepShaver runs under the normal user, but I cannot get the actual program inside the bundle to run as root. It gives error 9, the same error that occurs when users first try to run SheepShaver on Sierra. However, moving the program outside the bundle and back in doesn't solve this issue.
[…]
after some 20 minutes of idling finally an Appletalk server appeared in the Chooser in 9.2 in Qemu. This was another machine running PPC 10.4. I could connect and all sharing appeared OK. So it seems Qemu can use Appletalk afterall, but why this delay happens is beyond me.
I've seen this before with SheepShaver and sometimes running tcpdump got stuff going...
So on SheepShaver, this only seems to work smoothly with Mavericks and up, but it stops working with Sierra (or possibly earlier). Mountain Lion only when tweaking the network settings.

Present pre-compiled QEMU versions don't work on Mountain Lion (and possibly some later versions), but AppleTalk does with some patience on newer macOS versions.

In my opinion, for the purpose of running a print server for old LocalTalk printers, it would make sense to amend the SheepShaver print server guide. Leave existing information for Snow Leopard as it is, add the networking method from this thread with SheepShaver for Mavericks up to maybe El Capitan (I'm just guessing here), and refer to QEMU with this networking method for Sierra and up.

Re: LPD printer@Mountain Lion won't connect to Print66@SS

Posted: Tue Jun 13, 2017 10:38 pm
by adespoton
Makes sense, especially as yet again functionality of SheepShaver may be on the chopping block if Apple gets serious about 32-bit code. High Sierra seems to still be SheepShaver friendly though.