Re: Disk errors on PowerBook 180

Nat Sloss <[email protected]> Thu, 14 May 2026 06:58:00 +1000
Newsgroups gmane.os.netbsd.ports.mac68k
Message-ID <[email protected]>
--Boundary-01=_ZXOBqxakFcWeD7c
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit


>tinyx-wscons for mac68k architecture is not available from pkgsrc?

For the moment there are no pakages for tinyx-wscons for mac68k, you can cross 
compile a package for it though using the compiler tools from a mac68k release 
build of NetBSD.

I've found when cross compiling packages it is necessary to replace the 
buildlink libs from the package build directory with the ones from a mac68k 
release (/usr/X11/libs) otherwize linking the cross compiled package fails.

For my setup I unpack pkgsrc sources to a directory.
Build a mac68k release with the stock X11.

and change to the packages directory ie /home/admin/pkgsrc/x11/tinyx-wscons
run USE_CROSS_COMPILE=yes make package-install.

I have the following in my /etc/mk.conf:

.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
# Point pkgsrc at the NetBSD tooldir and destdir for cross builds.
CROSS_MACHINE_ARCH=m68k
CROSSBASE=           
${LOCALBASE}/cross-${TARGET_ARCH:U${MACHINE_ARCH:S/m68ksf/m68k/}}
TOOLDIR=         /home/admin/mac68k-softfloat/tooldir.NetBSD-11.99.1-amd64/
CROSS_DESTDIR=   /home/admin/mac68k-softfloat/destdir.mac68k
# Specify the machine architecture of target packages.
# Specify the OS of target packages.
CROSS_OPSYS=            NetBSD
CROSS_OS_VERSION=       10.0
CROSS_OPSYS_VERSION=    100000
CROSS_LOWER_OPSYS=   netbsd
CROSS_LOWER_OPSYS_VERSUFFIX= # empty
CROSS_LOWER_OS_VARIANT=      # empty
CROSS_LOWER_VARIANT_VERSION= # empty
CROSS_LOWER_VENDOR=          # empty
CROSS_OBJECT_FMT=       ELF
PKGSRC_USE_SSP=                 no
PKGSRC_USE_STACK_CHECK?=        no
.endif

My mac68k tool directory is the one from the mac68k release I built in 
/home/admin/mac68k-softfloat (as I built a softfloat relase for my powerbooks 
- its a bit faster).

The compilation runs until it errors with linking and displays unknown arch 
for libraries.

So I change to the package/tiny-wscons/work.NetBSD.m68k work directory and 
remove buildlink/libs/* and copy from my NetBSD-mac68k release directory 
mac68k-softfloat/destdir.mac68k/usr/X11R7/libs/* to buildlink/libs same for 
any dependent libraries in mac68k-softfloat/destdir.mac68k/usr/pkg/lib/* to 
buildlink/libs/ and rerun USE_CROSS_COMPILE=yes make package-install

There will be a package in pkgsrc/packages.m68k/All which you can then install 
on the macintosh.


Best regards,

Nat

--Boundary-01=_ZXOBqxakFcWeD7c
Content-Type: text/html;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">&gt;tinyx-wscons for mac68k architecture is not available from pkgsrc?</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">For the moment there are no pakages for tinyx-wscons for mac68k, you can cross compile a package for it though using the compiler tools from a mac68k release build of NetBSD.</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">I've found when cross compiling packages it is necessary to replace the buildlink libs from the package build directory with the ones from a mac68k release (/usr/X11/libs) otherwize linking the cross compiled package fails.</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">For my setup I unpack pkgsrc sources to a directory.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">Build a mac68k release with the stock X11.</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">and change to the packages directory ie /home/admin/pkgsrc/x11/tinyx-wscons</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">run USE_CROSS_COMPILE=yes make package-install.</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">I have the following in my /etc/mk.conf:</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';"># Point pkgsrc at the NetBSD tooldir and destdir for cross builds.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">CROSS_MACHINE_ARCH=m68k</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">CROSSBASE=           ${LOCALBASE}/cross-${TARGET_ARCH:U${MACHINE_ARCH:S/m68ksf/m68k/}}</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">TOOLDIR=         /home/admin/mac68k-softfloat/tooldir.NetBSD-11.99.1-amd64/</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">CROSS_DESTDIR=   /home/admin/mac68k-softfloat/destdir.mac68k</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';"># Specify the machine architecture of target packages.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';"># Specify the OS of target packages.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">CROSS_OPSYS=            NetBSD</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">CROSS_OS_VERSION=       10.0</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">CROSS_OPSYS_VERSION=    100000</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">CROSS_LOWER_OPSYS=   netbsd</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">CROSS_LOWER_OPSYS_VERSUFFIX= # empty</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">CROSS_LOWER_OS_VARIANT=      # empty</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">CROSS_LOWER_VARIANT_VERSION= # empty</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">CROSS_LOWER_VENDOR=          # empty</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">CROSS_OBJECT_FMT=       ELF</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">PKGSRC_USE_SSP=                 no</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">PKGSRC_USE_STACK_CHECK?=        no</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">.endif</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">My mac68k tool directory is the one from the mac68k release I built in /home/admin/mac68k-softfloat (as I built a softfloat relase for my powerbooks - its a bit faster).</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">The compilation runs until it errors with linking and displays unknown arch for libraries.</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">So I change to the package/tiny-wscons/work.NetBSD.m68k work directory and remove buildlink/libs/* and copy from my NetBSD-mac68k release directory mac68k-softfloat/destdir.mac68k/usr/X11R7/libs/* to buildlink/libs same for any dependent libraries in mac68k-softfloat/destdir.mac68k/usr/pkg/lib/* to buildlink/libs/ and rerun USE_CROSS_COMPILE=yes make package-install</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">There will be a package in pkgsrc/packages.m68k/All which you can then install on the macintosh.</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">Best regards,</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">Nat</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p></body></html>
--Boundary-01=_ZXOBqxakFcWeD7c--