CI failure on MacOS

22 views
Skip to first unread message

Dimitry Sibiryakov

unread,
Sep 18, 2023, 12:38:36 PM9/18/23
to Firebird Developers List
Hello All,

Does Mac really has no atomic header? It is C++ 11 standard.

--
WBR, SD.

Vlad Khorsun

unread,
Sep 18, 2023, 12:44:26 PM9/18/23
to firebir...@googlegroups.com
18.09.2023 19:38, 'Dimitry Sibiryakov' via firebird-devel wrote:
>   Hello All,
>
>   Does Mac really has no atomic header? It is C++ 11 standard.
>

If you ask about this error:

/Users/runner/work/firebird/firebird/examples/dbcrypt/DbCrypt.cpp:28:10: fatal error: 'atomic' file not found

then read also previous line:

clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard
library instead [-Wstdlibcxx-not-found]

Hope, this helps.

Regards,
Vlad

Dimitry Sibiryakov

unread,
Sep 18, 2023, 2:56:31 PM9/18/23
to firebir...@googlegroups.com
Vlad Khorsun wrote 18.09.2023 18:44:
>   If you ask about this error:
>
> /Users/runner/work/firebird/firebird/examples/dbcrypt/DbCrypt.cpp:28:10: fatal
> error: 'atomic' file not found
>
> then read also previous line:
>
>  clang: warning: include path for libstdc++ headers not found; pass
> '-stdlib=libc++' on the command line to use the libc++ standard library instead
> [-Wstdlibcxx-not-found]
>
> Hope, this helps.

It seems to be outside of scope for my pull requests...

--
WBR, SD.

Vlad Khorsun

unread,
Sep 18, 2023, 3:09:29 PM9/18/23
to firebir...@googlegroups.com
It is not related with your pull requests, AFAIU.

Regards,
Vlad

James Starkey

unread,
Sep 18, 2023, 3:28:17 PM9/18/23
to firebir...@googlegroups.com
atomic.h shouldn't be necessary.  There are gcc compiler intrinsics for
atomic compare-and-swap, increment, decrement, add, and more.  The
intrinsics are a great deal more portable than lower level functions
(they are implemented with whatever primitives are available).  The days
of inline assembler are long, long (and happily) gone.

Adriano dos Santos Fernandes

unread,
Sep 18, 2023, 3:29:53 PM9/18/23
to firebir...@googlegroups.com
Em 18/09/23 16:09, Vlad Khorsun escreveu:
I will fix it today.


Adriano

Vlad Khorsun

unread,
Sep 18, 2023, 3:33:35 PM9/18/23
to firebir...@googlegroups.com
18.09.2023 22:28, James Starkey wrote:
> atomic.h shouldn't be necessary.  There are gcc compiler intrinsics for atomic compare-and-swap, increment, decrement, add, and
> more.  The intrinsics are a great deal more portable than lower level functions (they are implemented with whatever primitives are
> available).  The days of inline assembler are long, long (and happily) gone.

It is not about <atomic.h>, it is about C++ header <atomic> (without .h).

But it is good to hear from you anyway ;)

Regards,
Vlad

Jim Starkey

unread,
Sep 18, 2023, 3:46:31 PM9/18/23
to firebir...@googlegroups.com
Sorry, but I'm now officially an old fart.  I can't image what demented
fool decided that headers with an extension was a good idea.  I also
avoid ANYTHING containing std:: based on miserable past experiences
(extreme non-portability and pathetic performance).  With the exception
of conditional headers for Windows, AmorphousDB is almost without
conditional compilation.
--
Jim Starkey, AmorphousDB, LLC

Alex Peshkoff

unread,
Sep 19, 2023, 5:31:11 AM9/19/23
to firebir...@googlegroups.com
On 9/18/23 22:46, Jim Starkey wrote:
> I can't image what demented fool decided that headers with an
> extension was a good idea.

What's worse - <header> vs <header.h> may contain very different things.

> I also avoid ANYTHING containing std:: based on miserable past
> experiences (extreme non-portability and pathetic performance).

Yes, but it became much better today compared with what we had 20 (or
even 10) years ago. There are some design disadvantages but IMHO one can
live with them.

> With the exception of conditional headers for Windows, AmorphousDB is
> almost without conditional compilation.

What is also nice with std:: GNU & Microsoft implementations of it are
well compatible, i.e. no need (or almost no need) in #ifdef-s when using
std:: objects.


Reply all
Reply to author
Forward
0 new messages