ROOT on mac os Ventura and jupyter-lab weird behaviour

Dear expert,

I upgraded my mac to Ventura recently and went through a painful upgade of python to 3.11 and recompile from source ROOT ( had to switch to ROOT Version: 6.29/01, i.e use master i think, enable C++17 for a software that needs it)…
Everything went well (modulo some flags to switch on/off for CXX_MODULE and clad dependency). Tough i saw something a bit weird on using jupyter-lab.

With ipython

$|=>ipython
import ROOT -Python 3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]
Type 'copyright', 'credits' or 'license' for more information
In [2]: import ROOT as r

In [3]:

When however i open a notebook (jupyter-lab) , at the very first import i do i get this:

[C 2023-01-23 10:52:55.431 ServerApp]

    To access the server, open this file in a browser:
        file:///Users/quaglian/Library/Jupyter/runtime/jpserver-69018-open.html
    Or copy and paste one of these URLs:
        http://localhost:8890/lab?token=d2a777962ffe2106605957148c8d964e945b65cf5b02d3e8
     or http://127.0.0.1:8890/lab?token=d2a777962ffe2106605957148c8d964e945b65cf5b02d3e8
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.

Then i lunch a python3 kernel and at the first import i do :

In file included from input_line_34:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/dlfcn.h:64:37: warning: unknown platform 'driverkit' in availability macro [-Wavailability]
extern int dlclose(void * __handle) __DYLDDL_DRIVERKIT_UNAVAILABLE;
                                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/dlfcn.h:44:41: note: expanded from macro '__DYLDDL_DRIVERKIT_UNAVAILABLE'
 #define __DYLDDL_DRIVERKIT_UNAVAILABLE __API_UNAVAILABLE(driverkit)
                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/Availability.h:451:209: note: expanded from macro '__API_UNAVAILABLE'
    #define __API_UNAVAILABLE(...) __API_UNAVAILABLE_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE8,__API_UNAVAILABLE7,__API_UNAVAILABLE6,__API_UNAVAILABLE5,__API_UNAVAILABLE4,__API_UNAVAILABLE3,__API_UNAVAILABLE2,__API_UNAVAILABLE1, 0)(__VA_ARGS__)
                                                                                                                                                                                                                ^
In file included from input_line_34:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/dlfcn.h:65:29: warning: unknown platform 'driverkit' in availability macro [-Wavailability]
extern char * dlerror(void) __DYLDDL_DRIVERKIT_UNAVAILABLE;
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/dlfcn.h:44:41: note: expanded from macro '__DYLDDL_DRIVERKIT_UNAVAILABLE'
 #define __DYLDDL_DRIVERKIT_UNAVAILABLE __API_UNAVAILABLE(driverkit)
                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/Availability.h:451:209: note: expanded from macro '__API_UNAVAILABLE'
    #define __API_UNAVAILABLE(...) __API_UNAVAILABLE_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE8,__API_UNAVAILABLE7,__API_UNAVAILABLE6,__API_UNAVAILABLE5,__API_UNAVAILABLE4,__API_UNAVAILABLE3,__API_UNAVAILABLE2,__API_UNAVAILABLE1, 0)(__VA_ARGS__)
                                                                                                                                                                                                                ^
In file included from input_line_34:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/dlfcn.h:66:55: warning: unknown platform 'driverkit' in availability macro [-Wavailability]
extern void * dlopen(const char * __path, int __mode) __DYLDDL_DRIVERKIT_UNAVAILABLE;
                                                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/dlfcn.h:44:41: note: expanded from macro '__DYLDDL_DRIVERKIT_UNAVAILABLE'
 #define __DYLDDL_DRIVERKIT_UNAVAILABLE __API_UNAVAILABLE(driverkit)
                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/Availability.h:451:209: note: expanded from macro '__API_UNAVAILABLE'
    #define __API_UNAVAILABLE(...) __API_UNAVAILABLE_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE8,__API_UNAVAILABLE7,__API_UNAVAILABLE6,__API_UNAVAILABLE5,__API_UNAVAILABLE4,__API_UNAVAILABLE3,__API_UNAVAILABLE2,__API_UNAVAILABLE1, 0)(__VA_ARGS__)
                                                                                                                                                                                                                ^
In file included from input_line_34:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/dlfcn.h:70:101: warning: unknown platform 'driverkit' in availability macro [-Wavailability]
extern bool dlopen_preflight(const char* __path) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) __DYLDDL_DRIVERKIT_UNAVAILABLE;
                                                                                                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/dlfcn.h:44:41: note: expanded from macro '__DYLDDL_DRIVERKIT_UNAVAILABLE'
 #define __DYLDDL_DRIVERKIT_UNAVAILABLE __API_UNAVAILABLE(driverkit)
                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/Availability.h:451:209: note: expanded from macro '__API_UNAVAILABLE'
    #define __API_UNAVAILABLE(...) __API_UNAVAILABLE_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE8,__API_UNAVAILABLE7,__API_UNAVAILABLE6,__API_UNAVAILABLE5,__API_UNAVAILABLE4,__API_UNAVAILABLE3,__API_UNAVAILABLE2,__API_UNAVAILABLE1, 0)(__VA_ARGS__)

Apparently those are all warnings, and indeed it keeps working. Does anyone know how i can fully suppress those warnings in my notebook session?

Thanks in advance

Renato

@vpadulan will look at it.

1 Like

Hi @RENATO_QUAGLIANI ,

Unfortunately the 3.11 upgrade is proving to be an issue for many Python packages. I’m sorry you had to go through that pain, I just wanted to specify that unless you need to modify ROOT yourself, you should install it via some package manager. For example in this post I described how to do so in a couple lines with mamba ROOT build with Python 3.7 in centos7 - #8 by vpadulan (in your case you can just write python==3.11.* to specify the python version). Other installation instructions are at Installing ROOT - ROOT

Regarding the warnings in Jupyter lab, I’ve never seen them. The first one is suppressable via the suggested environment variable I guess, I don’t know what to do for the others. I can try to investigate, I’ll let you know if I find anything.

Cheers,
Vincenzo

1 Like

Thank you , the reason i am building from scratch is to enable few flags by myself whcih are needed for further packages i am developing which uses root enabling c++17 and vdt usage, eigen3 etc… so i wanted to have full control of what i build. So far things are working fine anyway, except those warnings/errors in jupyter notebooks.