Re: build of db60-aes-6.0.30-2 failed

Hanspeter Niederstrasser <[email protected]> Sat, 5 Oct 2024 20:47:15 -0500
Newsgroups gmane.os.apple.fink.general
Organization Snaggled Works
Message-ID <[email protected]>
On 10/5/24 8:22 PM, Derek Homeier wrote:
> 
> 
>> On 6 Oct 2024, at 1:11 AM, Hanspeter Niederstrasser <[email protected]> wrote:
>>
>>>>> In the build output, look for "checking for thread local storage (TLS) class" early on. What's the result of this search? On my 10.14 machine, I get "pthread".
>>>>>
>>>>> Hanspeter
>>> Just to chime in, I have the same error:
>>> checking whether the C++ compiler supports templates for STL... yes
>>> checking whether C++ supports the wstring class... checking for thread local storage (TLS) class... none
>>> checking whether stat file-mode macros are broken... no
>>> But this is with the newer Xcode and I hadn’t updated my Command Line tools yet:
>>> Package manager version: 0.45.99.git
>>> Distribution version: selfupdate-git Sat Oct  5 13:24:50 2024, 13.0, x86_64
>>> Trees: local/injected local/main stable/main
>>> Xcode.app: 16.0
>>> Xcode command-line tools: 15.3.0.0.1.1708646388
>>> Max. Fink build jobs:  1
>>
>> Pretty sure the compile failure is because the TLS configure test is failing. Ideally, that should stop everything, but the system is not smart enough to abort at the beginning and instead keeps going until later when it needs TLS.
>>
>> Can you send the file /opt/sw/src/fink.build/db60-aes-6.0.30-2/db-6.0.30/build_unix/config.log ? It might be too big, so please send offline.
>>
> Same failure here on Sonoma 14.7. The check in configure is failing on undeclared NULL;
> there are a number of suggestions around the web to include stddef.h; simply use 0 instead,
> or nullptr on newer c++, but not sure how to best fix this for the db60 build.
> FWIW removing the --enable-stl configarg lets it succeed.
> 
> Cheers,
> 					Derek
> 
> configure:19161: checking for thread local storage (TLS) class
> configure:19197: g++ -c -Os  conftest.cpp >&5
> conftest.cpp:30:72: error: use of undeclared identifier 'NULL'
>     30 |               template<typename T>  __thread  T* TLSClass<T>::tlsvar = NULL;
>        |                                                                        ^
> conftest.cpp:30:72: error: initializer for thread-local variable must be a constant expression
>     30 |               template<typename T>  __thread  T* TLSClass<T>::tlsvar = NULL;
>        |                                                                        ^~~~
> conftest.cpp:36:25: error: use of undeclared identifier 'NULL'
>     36 | TLSClass<int>::tlsvar = NULL; TLSClass2::tlsvar = 1;
>        |                         ^
> conftest.cpp:30:72: error: initializer for thread-local variable must be a constant expression
>     30 |               template<typename T>  __thread  T* TLSClass<T>::tlsvar = NULL;
>        |                                                                        ^~~~
> conftest.cpp:36:16: note: in instantiation of static data member 'TLSClass<int>::tlsvar' requested here   36 | TLSClass<int>::tlsvar = NULL; TLSClass2::tlsvar = 1;
>        |                ^

Those are red herrings. There are multiple attempts to get a TLS source. 
Most of them fail on macOS, but the last one for pthread is the one 
that's supposed to work on macOS. But while earlier releases treated a 
pointer to integer conversion as a warning, that's now an error. 
Changing the pointer rescues the test. I've pushed a fix to git.

Hanspeter

-- 
And when the last last law was down, and the Devil turned round on
you - where would you hide, Roper, the laws all being flat?
   --Robert Bolt, "A Man For All Seasons"



_______________________________________________
Fink-users mailing list
[email protected]
List archive:
https://sourceforge.net/p/fink/mailman/fink-users/
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users