RE: [fltk.coredev] FLTK Cairo builds (autoconf + CMake) - [General Use]

8 views
Skip to first unread message

MacArthur, Ian (Leonardo, UK)

unread,
Mar 3, 2021, 7:17:41 AM3/3/21
to fltkc...@googlegroups.com
On 3/1/21 11:47 AM Albrecht Schlosser wrote:
>
> Can you please test in your environments if the new Cairo build support
> works and report here?

So I went to test this out but:

- None of my Windows/mingw machines have pkg-config installed
- I don't actually have Cairo installed on any of them either (at least not on any I have ready access to just now... lockdown...)
- I don’t actually have pkg-config on my Mac either

So broadly unhelpful in terms of testing this change, I'm afraid!



Leonardo MW Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

MacArthur, Ian (Leonardo, UK)

unread,
Mar 3, 2021, 7:34:21 AM3/3/21
to fltkc...@googlegroups.com
This reply is going off-topic a bit, but:

> Is there a difference between fltk-config generated by configure vs CMake?

Under mingw, there is - but I wonder if this is a more generic issue?

In particular the "--optim" options are not set in the cmake generated file, but are set in the autoconf generated file.

But... I do wonder if all of the cmake build is ignoring the optim settings anyway, so what is in the fltk-config does match how the lib was actually built (but not how we wanted the lib to be built, in essence.)

Albrecht Schlosser

unread,
Mar 3, 2021, 8:45:52 AM3/3/21
to fltkc...@googlegroups.com
On 3/3/21 1:17 PM 'MacArthur, Ian (Leonardo, UK)' via fltk.coredev wrote:
> On 3/1/21 11:47 AM Albrecht Schlosser wrote:
>>
>> Can you please test in your environments if the new Cairo build support
>> works and report here?
>
> So I went to test this out but:
>
> - None of my Windows/mingw machines have pkg-config installed
> - I don't actually have Cairo installed on any of them either (at least not on any I have ready access to just now... lockdown...)
> - I don’t actually have pkg-config on my Mac either
>
> So broadly unhelpful in terms of testing this change, I'm afraid!

Thanks for testing anyway. Some notes:

I tried to go one step after the other, hence this commit relies on
pkg-config to include Cairo libs. I know that I also had issues with
pkg-config + Cairo on MSYS2 (mingw-w64) where (IIRC CMake) changed the
paths returned by pkg-config in unusable ways. I stopped researching
that though because it turned out to quickly get too complicated. Maybe
later again...

That said, I know that using pkg-config may not be reliable in all
environments and also that some users don't have it, so another way w/o
pkg-config is on my to-do list, but it can be difficult. pkg-config does
a good job and simplifies things in the build files, that is if it is
installed and works.

I opened another "question and answer" thread about macOS build
environments. I'd appreciate if you and others could shed some light on
your build environments.

Albrecht Schlosser

unread,
Mar 3, 2021, 9:00:27 AM3/3/21
to fltkc...@googlegroups.com
On 3/3/21 1:34 PM 'MacArthur, Ian (Leonardo, UK)' via fltk.coredev wrote:
> This reply is going off-topic a bit, but:
>
>> Is there a difference between fltk-config generated by configure vs CMake?
>
> Under mingw, there is - but I wonder if this is a more generic issue?

Yes, I think it's not only MinGW.

> In particular the "--optim" options are not set in the cmake generated file, but are set in the autoconf generated file.
>
> But... I do wonder if all of the cmake build is ignoring the optim settings anyway, so what is in the fltk-config does match how the lib was actually built (but not how we wanted the lib to be built, in essence.)

I can tell you that the CMake builds honor the "OPTION_OPTIM" flags in
the build, I'm often using this option in cmake-gui to add compiler
flags like "-Wno-deprecated-declarations" and others. This works fine.

The OPTION_OPTIM flags are however not initially populated by our CMake
build files as the equivalent flags are in configure (with flags related
to debugging or not). In CMake there are other means (for instance
CMAKE_CXX_FLAGS[_config] where '_config' can be '_Debug' etc.) to set
the compiler debug or no-debug flags, respectively.

That said, we need a way to "export" these or equivalent debug flags to
fltk-config which is supposedly the only missing point here. It's just
not done right now.

Sorry, I think you asked this already but I never came to doing it. I
should. Please remind me again later or open a GitHub Issue, maybe...

Ian MacArthur

unread,
Mar 4, 2021, 4:42:19 PM3/4/21
to coredev fltk
On 3 Mar 2021, at 14:00, Albrecht Schlosser wrote:
>
>> This reply is going off-topic a bit, but:
>>> Is there a difference between fltk-config generated by configure vs CMake?
>> Under mingw, there is - but I wonder if this is a more generic issue?
>
> Yes, I think it's not only MinGW.
>

> Sorry, I think you asked this already but I never came to doing it. I should. Please remind me again later or open a GitHub Issue, maybe...
>

Did I? Oh, sorry.
I know it’s a thing that’s bothered me from time to time, but I didn’t remember I’d reported it before...




Albrecht Schlosser

unread,
Mar 7, 2021, 8:42:35 AM3/7/21
to fltkc...@googlegroups.com
On 3/4/21 10:42 PM Ian MacArthur wrote:
> On 3 Mar 2021, at 14:00, Albrecht Schlosser wrote:
>>
>>> This reply is going off-topic a bit, but:
>>>> Is there a difference between fltk-config generated by configure vs CMake?
>>> Under mingw, there is - but I wonder if this is a more generic issue?
>>
>> Yes, I think it's not only MinGW.
>
>> Sorry, I think you asked this already but I never came to doing it. I should. Please remind me again later or open a GitHub Issue, maybe...
>
> Did I? Oh, sorry.

Don't worry, thanks for the reminder!

> I know it’s a thing that’s bothered me from time to time, but I didn’t remember I’d reported it before...

I checked it; yes, you did (and this is good). I picked it from issue
#115 (meanwhile closed) and added it to "my" issue #129 "fltk-config
needs improvements when created by CMake":

https://github.com/fltk/fltk/issues/129#issuecomment-679103248

... which is included in Milestone 1 "Release FLTK 1.4.0":
https://github.com/fltk/fltk/milestone/1

This should not be forgotten anymore, but I'll see if I can do this
soon, when time permits.
Reply all
Reply to author
Forward
0 new messages