Darwin support

231 views
Skip to first unread message

Alex Strickland

unread,
May 23, 2025, 7:42:49 AMMay 23
to Harbour Users
Hi

I tried to build Harbour on a Mac M1 and I did not get too far.

Looks like the png library needs to be updated:

clang   -I. -I../../../../../../include -fno-common -Wmissing-braces
-Wreturn-type -Wformat -Wimplicit-int -Wimplicit-function-declaration
-O3 -I/Users/alexstrickland/dev/harbour-core/src/3rd/zlib -DPNG_NO_STDIO
-DPNG_ARM_NEON_OPT=0  -o png.o  -c ../../../png.c
In file included from ../../../png.c:14:
../../../pngpriv.h:524:16: fatal error: 'fp.h' file not found
  524 | #      include <fp.h>
      |                ^~~~~~
1 error generated.

It looks easy to fix in a simplistic way, but really the png source
needs to be updated to 6.41 from 6.40 or ideally to the latest release
6.48 and I don't have a very good idea how to do that.

Is anyone maintaining a build for Harbour for Darwin and they have been
shy to try and get it into the https://github.com/harbour/core repository?

--

Regards

Alex


Robb

unread,
May 23, 2025, 4:16:58 PMMay 23
to Harbour Users

Alex,

I have been doing local builds on an M1 Mac for quite sometime time, typically just running a new build anytime there has been an update on GitHub for the project. The last build I did was after the last update on March 25, 2025 , and at the time I built it without issue. And, I don't remember ever having any real issues at all.

From the binary I currently built and use locally: Harbour 3.2.0dev (r2503251254)

That said, I just attempted to do another build after reading your post. The harbour source is still what I would have pulled back in March, no changes there. I was surprised that I got the same error on this build as you reported. I know I haven't touched the harbour repository, the only thing I can recall doing since 3/25 on this machine was the upgrade to Sequoia 15.5. I'm assuming that update also updated clang and that broke things, though I currently have no idea what that might be. If not that then I haven't a clue what changed to cause this. I don't have time to dig into it right now, but wanted to share my experience in this regard while I was thinking about it. I'm not disagreeing that the png source could stand to be updated, but I don't think that that alone is what broke this.

Robb

Francesco Perillo

unread,
May 23, 2025, 5:20:01 PMMay 23
to harbou...@googlegroups.com

https://forum.qt.io/topic/161705/building-for-ios-fatal-error-fp-h-file-not-found

https://community.aseprite.org/t/build-failed-on-macos-15-4-due-to-fp-h-not-found/25192/6

A couple of possible fixes... upgrading the lib is the best but must be done with extreme care


--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/9daa2953-f934-4588-8333-664c20039868n%40googlegroups.com.

lai...@paysoft.com.br

unread,
May 24, 2025, 12:34:53 AMMay 24
to Harbour Users
I am using mac m1 for long time and it is working ok.
probably there are some package homebew that you should install.

try 

brew install xquartz pcre libpng zlib

sudo ln -s /opt/X11 /usr/X11
sudo ln -s /opt/X11 /usr/X11R6

export HB_WITH_PCRE=local
export HB_WITH_ZLIB=local
export HB_WITH_JPEG=local
export HB_WITH_PNG=local


Then try it

make clean
make

Lorenzo Fiorini

unread,
May 25, 2025, 12:15:29 AMMay 25
to harbou...@googlegroups.com
Hello, I've got similar problems few weeks ago (see src/3rd/png and src/3rd/zlib build errors with latest MacOS 15.4 in Harbour lists)

Since 15.4, MacOS uses clang 17 that has changed a few things (search for clang 17 errors).

I've fixed using the latest versions from homebrew instead of local versions.

This is my actual setup:

export HB_WITH_ZLIB=/opt/homebrew/opt/zlib/include
export HB_WITH_PCRE=/opt/homebrew/opt/pcre/include
export HB_WITH_PNG=nolocal
export HB_WITH_JPEG=nolocal

Regards,
Lorenzo

--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.

Alex Strickland

unread,
May 26, 2025, 3:54:18 AMMay 26
to harbou...@googlegroups.com
Hi Lorenzo

I tried your suggestion, thank you. I got an error about zlib:

Makefile:329: *** ! Error: zlib component required, but not available. 
Stop.

so it looked like I needed homebrew so I installed that and then zlib:

brew install zlib

and:

make

and the compile seemed to go well and then I ran:

sudo make install

And then this pops up again:

clang   -I. -I../../../../../../include -fno-common -Wmissing-braces
-Wreturn-type -Wformat -Wimplicit-int -Wimplicit-function-declaration
-O3 -I/Users/alexstrickland/dev/harbour-core/src/3rd/zlib -DPNG_NO_STDIO
-DPNG_ARM_NEON_OPT=0  -o png.o  -c ../../../png.c
In file included from ../../../png.c:14:
../../../pngpriv.h:524:16: fatal error: 'fp.h' file not found
  524 | #      include <fp.h>
      |                ^~~~~~
1 error generated.

Any idea why make works and make install does not : (

--
Regards
Alex

Lorenzo Fiorini

unread,
May 26, 2025, 2:27:50 PMMay 26
to harbou...@googlegroups.com
Hi Alex, it seems it still tries to build the local version of png which is not working with clang 17.

Are you sure that these exports are in place?  

export HB_WITH_PNG=nolocal
export HB_WITH_JPEG=nolocal

png and jpeg in src/3rd are very old and are not used in the RTL so they can be omitted from the build while zlib and pcre are needed.

Regards,
Lorenzo

--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.

Alex Strickland

unread,
May 27, 2025, 4:16:18 AMMay 27
to harbou...@googlegroups.com

Hi Lorenzo

I did everything again, and it seems I must have done something odd between "make" and "make install", it all went smoothly.

Because I am stubborn (as you say I don't even use the png lib) I did this:

export HB_WITH_ZLIB=/opt/homebrew/opt/zlib/include
export HB_WITH_PCRE=/opt/homebrew/opt/pcre/include
export HB_WITH_PNG=/opt/homebrew/opt/libpng/include

and that all worked fine as well.

Thank you.
--
Regards
Alex

Alex Strickland

unread,
May 27, 2025, 4:19:12 AMMay 27
to harbou...@googlegroups.com

Hi

I experienced the same error as before. I am not sure what the point of installing homebrew versions is if you don't point the exports at them?

You may have seen from my other posts that I have a successful Harbour build under MacOS now.

I wondered actually what you use xquartz for?

Thank you for the reply.

--

Regards

Alex

Reply all
Reply to author
Forward
0 new messages