12.0-RELEASE Kernel Build Error on PowerPC (Mac Pro G5)

Hello. This is my very first post and relatively new FreeBSD user (please be gentle if I mess up the formatting per the forum rules). I installed 12.0-RELEASE on a Mac Pro G5 (PowerPC). It runs really good, and is making good use of an old machine. I wanted to build a custom kernel but wanted to first make sure I could simply compile the GENERIC kernel without any modifications whatsoever.

So I created an exact copy of the GENERIC configuration file in /usr/src/sys/powerpc/conf then started a build: make buildkernel KERNCONF=BRIANKERNEL.

The build crunched along for about 30 minutes before encountering a bunch of errors (the same error) in a particular file: /usr/src/sys/dev/ofw/ofw_standard.c

It's actually a warning, but the compiler is set to error out on warnings:

/usr/src/sys/dev/ofw/ofw_standard.c:177: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/usr/src/sys/dev/ofw/ofw_standard.c:182: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
....and so on for hundreds of more lines in the same file.

Any place where a pointer is being cast to
Code:
(cell_t)
this occurs.

For Example:

Code:
(cell_t)"test",

or

args.service = (cell_t)name;

On other platforms where I've installed FreeBSD 12.0 (amd64) I can build the kernel without any errors using the default source installed during the installation, so I'm reluctant to just edit the file to get around the issue.

Any thoughts on how I correct this the right way?

Thanks.
 
What FreeBSD version did you installed? powerpc or powerpc64? If it's powerpc64 you need the GENERIC64 kernel config (GENERIC is for powerpc)
 
What FreeBSD version did you installed? powerpc or powerpc64? If it's powerpc64 you need the GENERIC64 kernel config (GENERIC is for powerpc)

I installed powerpc...I think.
Code:
Snipit from DMESG: FreeBSD 12.0-RELEASE r341666 GENERIC powerpc

But I'll try building with GENERIC64 configuration. And if that doesn't work I'll reinstall with FREEBSD powerpc64 version since my G5 is a 64-bit machine.

Thanks for the big hint.
 
Following up. Thanks so much acheron. Basing my configuration off of GENERIC64 did the trick. All fixed! Thanks again.
 
Back
Top