Skip to content

Conversation

joaohf
Copy link
Contributor

@joaohf joaohf commented Sep 4, 2025

Hi,

There are cases where wx/configure.ac detects that wxwidgets does not have support for webview.

This check https://github.com/erlang/otp/blob/master/lib/wx/configure.ac#L373 checks
if wxwidget has webview support. Then, if 'yes' the define WXE_WEBVIEW is defined.

However in c_src/gen/wxe_macros.h the include wx/webview.h is included without respecting
WXE_WEBVIEW, leading to compilation errors like below:

| In file included from gen/wxe_wrapper_8.cpp:30:  
| gen/wxe_macros.h:74:10: fatal error: wx/webview.h: No such file or directory                                                                                                                                                             
|    74 | #include <wx/webview.h>                                                                                    
|       |          ^~~~~~~~~~~~~~                                                                                                                                                                                                          
| compilation terminated.                                                                                                                                                                                                                  
| In file included from gen/wxe_init.cpp:25:                                                                                                                                                                                               
| gen/wxe_macros.h:74:10: fatal error: wx/webview.h: No such file or directory                                                                                                                                                             
|    74 | #include <wx/webview.h>                                                                                    
|       |          ^~~~~~~~~~~~~~                                                                                    
| compilation terminated.                                                                                                                                                                                                                  
| In file included from gen/wxe_wrapper_2.cpp:30:                                                                    
| gen/wxe_macros.h:74:10: fatal error: wx/webview.h: No such file or directory                                                                                                                                                             
|    74 | #include <wx/webview.h>                                                                                                                                                                                                          
|       |          ^~~~~~~~~~~~~~                                                                                                                                                                                                          
| compilation terminated.                                                                                                                                                                                                                  
| In file included from gen/wxe_wrapper_7.cpp:30:                                                                                                                                                                                          
| gen/wxe_macros.h:74:10: fatal error: wx/webview.h: No such file or directory                                                                                                                                                             
|    74 | #include <wx/webview.h>                                                                                                                                                                                                          
|       |          ^~~~~~~~~~~~~~                                                                                                                                                                                                          
| compilation terminated.                                                                                                                                                                                                                  
| In file included from gen/wxe_events.cpp:28:                                                                                                                                                                                             
| gen/wxe_macros.h:74:10: fatal error: wx/webview.h: No such file or directory                                                                                                                                                             
|    74 | #include <wx/webview.h>                                                                                                                                                                                                          
|       |          ^~~~~~~~~~~~~~                                                                                                                                                                                                          
| compilation terminated.
| In file included from gen/wxe_wrapper_5.cpp:30:
| gen/wxe_macros.h:74:10: fatal error: wx/webview.h: No such file or directory
|    74 | #include <wx/webview.h>
|       |          ^~~~~~~~~~~~~~
| compilation terminated.
| In file included from gen/wxe_wrapper_4.cpp:30:
| gen/wxe_macros.h:74:10: fatal error: wx/webview.h: No such file or directory
|    74 | #include <wx/webview.h>
|       |          ^~~~~~~~~~~~~~
| In file included from gen/wxe_wrapper_6.cpp:30:
| gen/wxe_macros.h:74:10: fatal error: wx/webview.h: No such file or directory
|    74 | #include <wx/webview.h>
|       |          ^~~~~~~~~~~~~~
| compilation terminated.
| compilation terminated.
| In file included from gen/wxe_wrapper_3.cpp:30:
| gen/wxe_macros.h:74:10: fatal error: wx/webview.h: No such file or directory
|    74 | #include <wx/webview.h>
|       |          ^~~~~~~~~~~~~~
| compilation terminated.
| In file included from gen/wxe_wrapper_1.cpp:30:
| gen/wxe_macros.h:74:10: fatal error: wx/webview.h: No such file or directory
|    74 | #include <wx/webview.h>
|       |          ^~~~~~~~~~~~~~

It's clear from configure that webview is not available, but wx will still work, I believed:

checking for GL/gl.h... yes
checking for GL/glu.h... yes
checking for wx-config... (cached) /build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-erlang/28.0.1/recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/bin/crossscripts/wx-config --prefix=/build/
tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-erlang/28.0.1/recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr --baselib=lib
checking for wxWidgets version >= 3.0.2 (--unicode)... yes (version 3.2.8)
checking for wxWidgets static library... no
checking for wxwidgets webview... no
checking for wx-config... (cached) /build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-erlang/28.0.1/recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/bin/crossscripts/wx-config --prefix=/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-erlang/28.0.1/recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr --baselib=lib
checking for wxWidgets version >= 3.0.2 (--unicode --debug=yes)... yes (version 3.2.8)
checking for wxWidgets static library... no
checking for debug build of wxWidgets... yes
checking for wx-config... (cached) /build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-erlang/28.0.1/recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/bin/crossscripts/wx-config --prefix=/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-erlang/28.0.1/recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr --baselib=lib
checking for wxWidgets version >= 3.0.2 (--unicode --debug=no)... yes (version 3.2.8)
checking for wxWidgets static library... no
checking for standard build of wxWidgets... yes
checking for wxwidgets 3.0 compatibility ... yes
checking for wxwidgets opengl support... yes
*********************************************************************
**********************  APPLICATIONS INFORMATION  *******************
*********************************************************************

wx             : wxWidgets was not compiled with --enable-webview or wxWebView developer package is not installed, wxWebView will NOT be available

*********************************************************************

Thanks

Copy link
Contributor

github-actions bot commented Sep 4, 2025

CT Test Results

  2 files   17 suites   3m 36s ⏱️
157 tests 150 ✅ 7 💤 0 ❌
173 runs  166 ✅ 7 💤 0 ❌

Results for commit d1c88c7.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@rickard-green rickard-green added the team:PS Assigned to OTP team PS label Sep 8, 2025
@dgud dgud added the testing currently being tested, tag is used by OTP internal CI label Sep 9, 2025
@dgud dgud self-assigned this Sep 9, 2025
@joaohf joaohf force-pushed the fix-wx-macros-without-webview branch from 4a6234b to 13dde6e Compare September 24, 2025 13:21
@dgud
Copy link
Contributor

dgud commented Sep 24, 2025

Can you rebase again (on maint) set the target above to maint so we can get it out earlier than 29.
Also wxWidgets fix merged right now for fixing Mac CI builds.

@joaohf joaohf force-pushed the fix-wx-macros-without-webview branch from 13dde6e to aa11466 Compare September 24, 2025 15:01
There are cases where wx/configure.ac detects that wxwidgets
does not have support for webview.
@joaohf joaohf force-pushed the fix-wx-macros-without-webview branch from aa11466 to d1c88c7 Compare September 24, 2025 15:04
@joaohf
Copy link
Contributor Author

joaohf commented Sep 24, 2025

Alright, rebase on maint.

Thanks.

@dgud dgud changed the base branch from master to maint September 24, 2025 15:18
@dgud dgud added testing currently being tested, tag is used by OTP internal CI and removed testing currently being tested, tag is used by OTP internal CI labels Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants