Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question/suggestion: Qt as a static library (dependent component license restrictions) #11

Closed
treeswift opened this issue Dec 13, 2021 · 77 comments

Comments

@treeswift
Copy link

If Qt is compiled as a static library, it can only be used by GPL-licensed components (static linkage produces a "derivative work", while dynamic merely constitutes "use"). Not a big issue as long as we have no [non-GPL, or any, for that matter] Qt apps in the repo, but we may want to (and users may want, too).

I would suggest switching Qt artifact build mode from static to shared. If it's unacceptable for any reason, we should put a heads up note somewhere in the documentation. (I understand the issue isn't introduced here but rather is common w/ mxe/mxe, but Intel builds worry me much less, TBH.)

E-mailed w/ more details. /* Currently injecting DX SDK into the declarative plugin, stay tuned. */

@treeswift
Copy link
Author

As an example, this little game (available on Ubuntu) is released under MIT license:
https://github.com/xiaoyong/2048-Qt

The least thing I want in life is to stick GPL to it.

@pahaze
Copy link
Member

pahaze commented Dec 13, 2021

I don't have a ton of knowledge on licenses, but I've been building Qt shared for Otter personally. Didn't know MXE did it static. BTW, MESA (libgallium_wgl) crashes on Windows 10RT (15035). I know it isn't related to this, but I thought I would let you know.

@pahaze
Copy link
Member

pahaze commented Dec 13, 2021

Switching to shared works perfectly fine for me though.

@treeswift
Copy link
Author

MESA (libgallium_wgl) crashes on Windows 10RT (15035). I know it isn't related to this, but I thought I would let you know.

I have a Win10RT build on Lumia 640XL, will be able to do rough troubleshooting. Guess should also install on it on a Surface to have a compatible testing environment.

Ambulance envvars:

set LIBGL_DEBUG=verbose
set D3D12_DEBUG=verbose
set GALLIUM_DRIVER=swr

https://docs.mesa3d.org/envvars.html
https://blogs.igalia.com/itoral/2014/09/04/driver-loading-and-querying-in-mesa/

@treeswift
Copy link
Author

or set GALLIUM_DRIVER=softpipe

@pahaze
Copy link
Member

pahaze commented Dec 13, 2021

I've used softpipe on my Surface, it is PAINFULLY slow. That's why I switched to ANGLE for Qt.

@treeswift
Copy link
Author

treeswift commented Dec 13, 2021

I've used softpipe on my Surface, it is PAINFULLY slow. That's why I switched to ANGLE for Qt.

Oh, cool, so it's not the intrastructure failing us, but D3D itself. Then just the first two envvars.

@treeswift
Copy link
Author

BTW how did you provide DX SDK to ANGLE? Some cmake flag? A path in the PATH var?

@pahaze
Copy link
Member

pahaze commented Dec 13, 2021

I didn't. I just used vcpkg with LLVM-MinGW. You set it up like normal on Linux, but with MXE/LLVM-MinGW in your path, then you build with vcpkg install angle:arm-mingw-dynamic or vcpkg install angle:arm-mingw-static. The files will be in installed/arm-mingw-dynamic(/static)/lib and installed/arm-mingw-dynamic(/static)/include. You just have to copy them to /home/you/mxe/usr/armv7-w64-mingw32.

@pahaze
Copy link
Member

pahaze commented Dec 13, 2021

It required some... strange fixes to build Qt though. Namely that a few defines were missing, had to explicitly define that we were using ANGLE/GLES2 in C++ files, etc. I can send the defines fix, it just needs added to the end of gl2ext.h in include/gles2.

#define GL_READ_FRAMEBUFFER_EXT           0x8CA8
#define GL_DRAW_FRAMEBUFFER_EXT           0x8CA9
#define GL_DRAW_FRAMEBUFFER_BINDING_EXT   0x8CA6
#define GL_READ_FRAMEBUFFER_BINDING_EXT   0x8CAA

#define GL_EXT_multiview_tessellation_geometry_shader 1

#define GL_EXT_multiview_texture_multisample 1

#define GL_EXT_multiview_timer_query 1

#define GL_EXT_packed_depth_stencil 1
#define GL_DEPTH_STENCIL_EXT              0x84F9
#define GL_UNSIGNED_INT_24_8_EXT          0x84FA
#define GL_DEPTH24_STENCIL8_EXT           0x88F0
#define GL_TEXTURE_STENCIL_SIZE_EXT       0x88F1
#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
#define GL_MAX_RENDERBUFFER_SIZE_EXT      0x84E8
#define GL_FRAMEBUFFER_BINDING_EXT        0x8CA6
#define GL_RENDERBUFFER_BINDING_EXT       0x8CA7
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
#define GL_FRAMEBUFFER_COMPLETE_EXT       0x8CD5
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
#define GL_FRAMEBUFFER_UNSUPPORTED_EXT    0x8CDD
#define GL_MAX_COLOR_ATTACHMENTS_EXT      0x8CDF
#define GL_COLOR_ATTACHMENT0_EXT          0x8CE0
#define GL_COLOR_ATTACHMENT1_EXT          0x8CE1
#define GL_COLOR_ATTACHMENT2_EXT          0x8CE2
#define GL_COLOR_ATTACHMENT3_EXT          0x8CE3
#define GL_COLOR_ATTACHMENT4_EXT          0x8CE4
#define GL_COLOR_ATTACHMENT5_EXT          0x8CE5
#define GL_COLOR_ATTACHMENT6_EXT          0x8CE6
#define GL_COLOR_ATTACHMENT7_EXT          0x8CE7
#define GL_COLOR_ATTACHMENT8_EXT          0x8CE8
#define GL_COLOR_ATTACHMENT9_EXT          0x8CE9
#define GL_COLOR_ATTACHMENT10_EXT         0x8CEA
#define GL_COLOR_ATTACHMENT11_EXT         0x8CEB
#define GL_COLOR_ATTACHMENT12_EXT         0x8CEC
#define GL_COLOR_ATTACHMENT13_EXT         0x8CED
#define GL_COLOR_ATTACHMENT14_EXT         0x8CEE
#define GL_COLOR_ATTACHMENT15_EXT         0x8CEF
#define GL_DEPTH_ATTACHMENT_EXT           0x8D00
#define GL_STENCIL_ATTACHMENT_EXT         0x8D20
#define GL_FRAMEBUFFER_EXT                0x8D40
#define GL_RENDERBUFFER_EXT               0x8D41
#define GL_RENDERBUFFER_WIDTH_EXT         0x8D42
#define GL_RENDERBUFFER_HEIGHT_EXT        0x8D43
#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
#define GL_STENCIL_INDEX1_EXT             0x8D46
#define GL_STENCIL_INDEX4_EXT             0x8D47
#define GL_STENCIL_INDEX8_EXT             0x8D48
#define GL_STENCIL_INDEX16_EXT            0x8D49
#define GL_RENDERBUFFER_RED_SIZE_EXT      0x8D50
#define GL_RENDERBUFFER_GREEN_SIZE_EXT    0x8D51
#define GL_RENDERBUFFER_BLUE_SIZE_EXT     0x8D52
#define GL_RENDERBUFFER_ALPHA_SIZE_EXT    0x8D53
#define GL_RENDERBUFFER_DEPTH_SIZE_EXT    0x8D54
#define GL_RENDERBUFFER_STENCIL_SIZE_EXT  0x8D55

#define GL_READ_FRAMEBUFFER_EXT           0x8CA8
#define GL_DRAW_FRAMEBUFFER_EXT           0x8CA9
#define GL_DRAW_FRAMEBUFFER_BINDING_EXT   0x8CA6
#define GL_READ_FRAMEBUFFER_BINDING_EXT   0x8CAA

#define GL_EXT_packed_float 1
#define GL_R11F_G11F_B10F_EXT             0x8C3A
#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
#define GL_RGBA_SIGNED_COMPONENTS_EXT     0x8C3C

#define GL_EXT_packed_pixels 1
#define GL_UNSIGNED_BYTE_3_3_2_EXT        0x8032
#define GL_UNSIGNED_SHORT_4_4_4_4_EXT     0x8033
#define GL_UNSIGNED_SHORT_5_5_5_1_EXT     0x8034
#define GL_UNSIGNED_INT_8_8_8_8_EXT       0x8035
#define GL_UNSIGNED_INT_10_10_10_2_EXT    0x8036

#define GL_SCALED_RESOLVE_FASTEST_EXT     0x90BA
#define GL_SCALED_RESOLVE_NICEST_EXT      0x90BB

#define GL_EXT_framebuffer_object 1
#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
#define GL_MAX_RENDERBUFFER_SIZE_EXT      0x84E8
#define GL_FRAMEBUFFER_BINDING_EXT        0x8CA6
#define GL_RENDERBUFFER_BINDING_EXT       0x8CA7
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
#define GL_FRAMEBUFFER_COMPLETE_EXT       0x8CD5
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
#define GL_FRAMEBUFFER_UNSUPPORTED_EXT    0x8CDD
#define GL_MAX_COLOR_ATTACHMENTS_EXT      0x8CDF
#define GL_COLOR_ATTACHMENT0_EXT          0x8CE0
#define GL_COLOR_ATTACHMENT1_EXT          0x8CE1
#define GL_COLOR_ATTACHMENT2_EXT          0x8CE2
#define GL_COLOR_ATTACHMENT3_EXT          0x8CE3
#define GL_COLOR_ATTACHMENT4_EXT          0x8CE4
#define GL_COLOR_ATTACHMENT5_EXT          0x8CE5
#define GL_COLOR_ATTACHMENT6_EXT          0x8CE6
#define GL_COLOR_ATTACHMENT7_EXT          0x8CE7
#define GL_COLOR_ATTACHMENT8_EXT          0x8CE8
#define GL_COLOR_ATTACHMENT9_EXT          0x8CE9
#define GL_COLOR_ATTACHMENT10_EXT         0x8CEA
#define GL_COLOR_ATTACHMENT11_EXT         0x8CEB
#define GL_COLOR_ATTACHMENT12_EXT         0x8CEC
#define GL_COLOR_ATTACHMENT13_EXT         0x8CED
#define GL_COLOR_ATTACHMENT14_EXT         0x8CEE
#define GL_COLOR_ATTACHMENT15_EXT         0x8CEF
#define GL_DEPTH_ATTACHMENT_EXT           0x8D00
#define GL_STENCIL_ATTACHMENT_EXT         0x8D20
#define GL_FRAMEBUFFER_EXT                0x8D40
#define GL_RENDERBUFFER_EXT               0x8D41
#define GL_RENDERBUFFER_WIDTH_EXT         0x8D42
#define GL_RENDERBUFFER_HEIGHT_EXT        0x8D43
#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
#define GL_STENCIL_INDEX1_EXT             0x8D46
#define GL_STENCIL_INDEX4_EXT             0x8D47
#define GL_STENCIL_INDEX8_EXT             0x8D48
#define GL_STENCIL_INDEX16_EXT            0x8D49
#define GL_RENDERBUFFER_RED_SIZE_EXT      0x8D50
#define GL_RENDERBUFFER_GREEN_SIZE_EXT    0x8D51
#define GL_RENDERBUFFER_BLUE_SIZE_EXT     0x8D52
#define GL_RENDERBUFFER_ALPHA_SIZE_EXT    0x8D53
#define GL_RENDERBUFFER_DEPTH_SIZE_EXT    0x8D54
#define GL_RENDERBUFFER_STENCIL_SIZE_EXT  0x8D55
#define GL_HALF_FLOAT_ARB                 0x140B
#define GL_ARB_texture_float 1
#define GL_TEXTURE_RED_TYPE_ARB           0x8C10
#define GL_TEXTURE_GREEN_TYPE_ARB         0x8C11
#define GL_TEXTURE_BLUE_TYPE_ARB          0x8C12
#define GL_TEXTURE_ALPHA_TYPE_ARB         0x8C13
#define GL_TEXTURE_LUMINANCE_TYPE_ARB     0x8C14
#define GL_TEXTURE_INTENSITY_TYPE_ARB     0x8C15
#define GL_TEXTURE_DEPTH_TYPE_ARB         0x8C16
#define GL_UNSIGNED_NORMALIZED_ARB        0x8C17
#define GL_RGBA32F_ARB                    0x8814
#define GL_RGB32F_ARB                     0x8815
#define GL_ALPHA32F_ARB                   0x8816
#define GL_INTENSITY32F_ARB               0x8817
#define GL_LUMINANCE32F_ARB               0x8818
#define GL_LUMINANCE_ALPHA32F_ARB         0x8819
#define GL_RGBA16F_ARB                    0x881A
#define GL_RGB16F_ARB                     0x881B
#define GL_ALPHA16F_ARB                   0x881C
#define GL_INTENSITY16F_ARB               0x881D
#define GL_LUMINANCE16F_ARB               0x881E
#define GL_LUMINANCE_ALPHA16F_ARB         0x881F

I know it's a messy fix, but I'm still very inexperienced, especially at my age.

@treeswift
Copy link
Author

Ack. Will further look into that, too.
These links
https://doc.qt.io/qt-5/windows-requirements.html
https://doc.qt.io/qt-5/windows-building.html
https://doc.qt.io/qt-5/configure-options.html
suggest that Qt uses a bundled copy of ANGLE.

@pahaze
Copy link
Member

pahaze commented Dec 13, 2021

Could never get it to build with that due to random failed tests, so I just went with Google's (/vcpkg's) plain ANGLE.

@treeswift
Copy link
Author

First successful build of qtdeclarative. Now building:

[git-log]   15236149 Qt in shared mode. Fixed qtimageformats, qtdeclarative.
[build]       qtgamepad              armv7-w64-mingw32
[build]       qtmultimedia           armv7-w64-mingw32
[build]       qtconnectivity         armv7-w64-mingw32
[build]       qtgraphicaleffects     armv7-w64-mingw32
[build]       qtlottie               armv7-w64-mingw32
[build]       qtpurchasing           armv7-w64-mingw32
[build]       qtquick3d              armv7-w64-mingw32
[build]       qtquickcontrols        armv7-w64-mingw32
[build]       qtquickcontrols2       armv7-w64-mingw32
[build]       qtremoteobjects        armv7-w64-mingw32
[build]       qtscxml                armv7-w64-mingw32
[build]       qttools                armv7-w64-mingw32
[build]       qtwebchannel           armv7-w64-mingw32
[build]       qtwebview              armv7-w64-mingw32

Installed 15035 on a Surface 2 for regression testing. (If 9600 is Rita, then 1535 is Lima, for the year Peru's capital was founded?)
Feature level 9 confirmed.
In Qt, I artificially suppressed D3D12 detection -- was a false positive (found on host system, inferred availability on the target).
Still planning to backport the DX MESA plugin, but Qt stays at a safe D3D9 compatibility level.

@pahaze
Copy link
Member

pahaze commented Dec 17, 2021

Lima sounds good. Also, yeh, I forgot about DX12 in Qt. Give me a minute and I'll send you the configuration lines I used 👍

@pahaze
Copy link
Member

pahaze commented Dec 17, 2021

./configure -xplatform win32-clang-g++ -prefix /home/pahaze/mxe/usr/armv7-w64-mingw32 -no-d3d12 -no-opengl -no-gstreamer -no-directshow -wmf -skip qtactiveqt -skip qtquick3d

Here ya go. QtActiveQt and QtQuick3D was broken from OG source, so I disabled them. As for WMF, DirectShow crashes on 15035 (Surface 2) and like said... I didn't (and am not really sure still) how to debug it.

@treeswift
Copy link
Author

-no-d3d12

That was the flag! I simulated a failed D3D12 test by patching out a D3D12 #include line.

As for WMF, DirectShow crashes on 15035 (Surface 2) and like said... I didn't (and am not really sure still) how to debug it.

Will take a look. Have both setups (9600 and 15035) now.

@pahaze
Copy link
Member

pahaze commented Dec 17, 2021

Awesome! I'll look into how to debug, if you could say what app I should use (or even the steps 😩), that'd be really helpful.

(And the platform without CROSS_COMPILE on my config is like that on purpose because I hardcoded it for the time being ;) )

@pahaze
Copy link
Member

pahaze commented Dec 17, 2021

(I have been using WinDbg with no luck)

@treeswift
Copy link
Author

treeswift commented Dec 19, 2021

Installed the 15035 build. Built 2048-Qt as a test app. Did a preliminary troubleshooting w/ WinDBG in QT_OPENGL=angle mode (Mesa-mediated desktop predictably degrades to software). The crash in libEGL!eglCreatePbufferSurface (a very trivial null pointer access violation) reproduces on both 9600 and 15035. My present inference is that it's either caused by multiple components (both mesa and Qt) building libEGL (resulting in mismatched exported method signatures), or, more likely, Qt not building ANGLE at all.
There is a "combined ANGLE" mode in Qt that grabs all ANGLE stuff into a separate (and distinctly named) DLL. Enabling it requires a few configuration tests to pass, which they don't as of now. All of them need some DX includes and libraries; ARM32 versions are available in W10 SDK, but passing its entire include and library directories as extra INCDIR/LIBDIR fails a few unrelated configuration tests. My next step would be to isolate the required DX includes and libraries into a really thin "W10 SDK DX" build-time dependency to place in the target sysroot -- similar to what I did with btprops.lib to build qtconnectivity. There will be 3-4 *.lib files and maybe 10 includes.

Qt apps (as opposed to Qt libraries) fit naturally in %DISTRO_ROOT%/Qt5. Any other location needs a qt.conf. For apps with a lot of data files hosted in separate folders an extra conf file is probably okay though.

OG image: 2048-Qt running in software.
WP_20211219_07_51_42_Pro

@pahaze
Copy link
Member

pahaze commented Dec 19, 2021

That crash is likely MESA/Qt's ANGLE. If you look at the latest Otter build, it uses ANGLE built from vcpkg and runs perfectly fine, even using WebGL on sites available with it. I could only test it on 15035 however. I don't have a dual boot setup going yet on my Surface. I do vaguely remember that null pointer error and it was fixable and related to something with a flag in the MESA build IIRC? Like -D__WINVER__ or something. I'll look on my PC's months old builds and tell you later, removing them may(?) work. As for the directory thing... Shouldn't you be able to just throw whatever folders you need in the root directory with the executable? That's what I did with Otter too. Works fine AFAIK.

@pahaze
Copy link
Member

pahaze commented Dec 19, 2021

OK I should probably rephrase "fine". It crashes on a lot of sites but WebGL/ANGLE works fine 😂😂😂.

@treeswift
Copy link
Author

treeswift commented Dec 19, 2021

Fair enough. Looks like ANGLE would be better off as a separate component providing EGL/OpenGLES, with MESA kept as a software fallback (and a d3d12 playground)? Then Qt (built in shared mode) would link with ANGLE (also built in shared mode) via ANGLE_DIR. I have yet to see if the Qt-ANGLE-DirectShow video codec integration stays functional that way, but I expect it would. DLLs providing OpenGL need to have different sonames (same as w/ Qt building "combined ANGLE"), and ANGLE should be the default (this deviates from "combined ANGLE"); also, keeping Qt as the ANGLE provider would introduce unnecessary package dependencies. So, OK, extracting a src/angle.mk.

throw whatever folders you need in the root directory with the executable?

Symlinked (and qt.conf isn't much different from a Unix symlink). Or 32G devices will quickly run out of space.

No dual boot here either, just a box of used RT and RT2 tablets.
Interesting that UCRT needs to be re-signed for running on 9600, its old MSFT signature has expired.

@pahaze
Copy link
Member

pahaze commented Dec 19, 2021

Fair enough. Looks like ANGLE would be better off as a separate component providing EGL/OpenGLES, with MESA kept as a software fallback (and a d3d12 playground)? Then Qt (built in shared mode) would link with ANGLE (also built in shared mode) via ANGLE_DIR.

ANGLE would likely be our best bet for ALL Qt OpenGL related stuff, EGL/OGLES/WebGL/etc. I don't know if using MESA as a software fallback would be functional at all given how horrendously slow softpipe is on the Surface devices (no clue about Lumia/etc), but it could be good as a D3D12 playground I suppose. ANGLE runs pretty good on the Surface devices though, apparently. I just forced it to link by using -opengl es2 though 😂. Didn't need ANGLE_DIR.

I have yet to see if the Qt-ANGLE-DirectShow video codec integration stays functional that way, but I expect it would. DLLs providing OpenGL need to have different sonames (same as w/ Qt building "combined ANGLE"), and ANGLE should be the default (this deviates from "combined ANGLE");

I don't know anything about what Qt outputs, I used vcpkg's ANGLE DLLs/libs only since I didn't want to even mess with Qt's ANGLE.

Symlinked (and qt.conf isn't much different from a Unix symlink). Or 32G devices will quickly run out of space.

Okay, true.

No dual boot here either, just a box of used RT and RT2 tablets.

Oh, I see. I only own one Surface device and no other ARM tablets 😢. I want more, but I do not have a job yet. May get a VM running for 15035 and get 9600 back on my Surface as a dual boot.

Interesting that UCRT needs to be re-signed for running on 9600, its old MSFT signature has expired.

I could have sworn the UCRT files are from the 10 SDK, wouldn't that make them automatically need signed (or am I wrong)?

@treeswift
Copy link
Author

I could have sworn the UCRT files are from the 10 SDK, wouldn't that make them automatically need signed (or am I wrong)?

They do have a signature, and it's expired. Enough for 9600 to complain.
Screenshot 2021-12-19 153832 - ucrt

I self-signed a certificate backdated to 2011 and expiring by 2221, that one works.

@pahaze
Copy link
Member

pahaze commented Dec 20, 2021

Interesting. I just never auto-signed myself 😂

@treeswift
Copy link
Author

PowerShell (admin):

New-SelfSignedCertificate -Type CodeSigningCert -Subject "CN=Rita" -TextExtension @("2.5.29.19={text}false") -KeyUsage DigitalSignature -KeyExportPolicy Exportable -NotBefore (Get-Date).AddMonths(-120) -KeyLength 2048 -NotAfter (Get-Date).AddMonths(2400) -FriendlyName "The Rita Distro"

(will display some hash, like ABCDABCDEFEFEFEFABCDABCDEFEFEFEF01230123)

Export-PfxCertificate -Cert Cert:\LocalMachine\My\ABCDABCDEFEFEFEFABCDABCDEFEFEFEF01230123 -FilePath c:\Code\rita.pfx -Password (ConvertTo-SecureString -String "margaret" -Force -AsPlainText)

Then it's possible to use signtool from WSL like this:

"/mnt/c/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/signtool.exe" sign /fd certHash /f "C:\\Code\\rita.pfx" /p "margaret" /v /debug some-binary.exe-or-dll

The current directory should be that of the file being signed, so pushd/popd.
An ARM build of signtool exists, so technically it should work on the target system too. Unneeded for 15035 but handy for 9600.

@treeswift
Copy link
Author

P.S. The Ubuntu for signtool is (expected to be) Mono signcode but Windows can't recognize the signature it generates.

@pahaze
Copy link
Member

pahaze commented Dec 20, 2021

I see. I barely ever use Windows, anything I do in it is now from a VM (thanks Win11 for breaking BCD and winload after a single restart!) cause of how horribly unstable and bad it is. I'll do any signing on my Surface, I can not bear normal Windows.

Screenshot_20211217-172447_Gallery.png

@treeswift
Copy link
Author

Well, thanks again for maintaining this toolchain and repo then! Really altruistic of you.

@treeswift
Copy link
Author

Crazy weird. GLES2 shouldn't reference EGL types.
_autogen_ means it's been generated with host-installed tools, which can diverge and most probably do.
Let me see what ANGLE uses for code generation.

@treeswift
Copy link
Author

treeswift commented Jan 8, 2022

generate_entry_points.py using data from gl.xml and gl_angle_ext.xml

@treeswift
Copy link
Author

From the mxe root...

mxe$ grep GLDEBUGPROC usr/armv7-w64-mingw32/include/GLES2/*.h
usr/armv7-w64-mingw32/include/GLES2/gl2ext.h:typedef void (GL_APIENTRY  *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
usr/armv7-w64-mingw32/include/GLES2/gl2ext.h:typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);
usr/armv7-w64-mingw32/include/GLES2/gl2ext.h:GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);

Is this the case for you, particularly the first typedef?

@treeswift
Copy link
Author

With line numbers:

mxe$ grep -n GLDEBUGPROC usr/armv7-w64-mingw32/include/GLES2/*.h
usr/armv7-w64-mingw32/include/GLES2/gl2ext.h:70:typedef void (GL_APIENTRY  *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
usr/armv7-w64-mingw32/include/GLES2/gl2ext.h:114:typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);
usr/armv7-w64-mingw32/include/GLES2/gl2ext.h:126:GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);

@treeswift
Copy link
Author

This is my Python environment:

$ dpkg --list | grep python
ii  libboost-mpi-python-dev                                     1.71.0.0ubuntu2                            amd64        C++ interface to the Message Passing Interface (MPI), Python Bindings (default version)
ii  libboost-mpi-python1.71-dev                                 1.71.0-6ubuntu6                            amd64        C++ interface to the Message Passing Interface (MPI), Python Bindings
ii  libboost-mpi-python1.71.0                                   1.71.0-6ubuntu6                            amd64        C++ interface to the Message Passing Interface (MPI), Python Bindings
ii  libboost-python-dev                                         1.71.0.0ubuntu2                            amd64        Boost.Python Library development files (default version)
ii  libboost-python1.71-dev                                     1.71.0-6ubuntu6                            amd64        Boost.Python Library development files
ii  libboost-python1.71.0                                       1.71.0-6ubuntu6                            amd64        Boost.Python Library
ii  libpython2-stdlib:amd64                                     2.7.17-2ubuntu4                            amd64        interactive high-level object-oriented language (Python2)
ii  libpython2.7-minimal:amd64                                  2.7.18-1~20.04.1                           amd64        Minimal subset of the Python language (version 2.7)
ii  libpython2.7-stdlib:amd64                                   2.7.18-1~20.04.1                           amd64        Interactive high-level object-oriented language (standard library, version 2.7)
ii  libpython3-dev:amd64                                        3.8.2-0ubuntu2                             amd64        header files and a static library for Python (default)
ii  libpython3-stdlib:amd64                                     3.8.2-0ubuntu2                             amd64        interactive high-level object-oriented language (default python3 version)
ii  libpython3.8:amd64                                          3.8.10-0ubuntu1~20.04.1                    amd64        Shared Python runtime library (version 3.8)
ii  libpython3.8-dev:amd64                                      3.8.10-0ubuntu1~20.04.1                    amd64        Header files and a static library for Python (v3.8)
ii  libpython3.8-minimal:amd64                                  3.8.10-0ubuntu1~20.04.1                    amd64        Minimal subset of the Python language (version 3.8)
ii  libpython3.8-stdlib:amd64                                   3.8.10-0ubuntu1~20.04.1                    amd64        Interactive high-level object-oriented language (standard library, version 3.8)
ii  python-apt-common                                           2.0.0ubuntu0.20.04.6                       all          Python interface to libapt-pkg (locales)
ii  python-backports.functools-lru-cache                        1.5-3build1                                all          backport of functools.lru_cache from Python 3.3 to Python 2
ii  python-bs4                                                  4.8.2-1                                    all          error-tolerant HTML parser for Python
ii  python-chardet                                              3.0.4-4build1                              all          universal character encoding detector for Python2
ii  python-html5lib                                             1.0.1-2                                    all          HTML parser/tokenizer based on the WHATWG HTML5 specification
ii  python-is-python2                                           2.7.17-4                                   all          symlinks /usr/bin/python to the DEPRECATED python2
ii  python-lxml:amd64                                           4.5.0-1ubuntu0.3                           amd64
pythonic binding for the libxml2 and libxslt libraries
ii  python-numpy                                                1:1.16.5-2ubuntu7                          amd64        Numerical Python adds a fast array facility to the Python language
ii  python-pip-whl                                              20.0.2-5ubuntu1.6                          all          Python package installer
ii  python-pkg-resources                                        44.0.0-2                                   all          Package Discovery and Resource Access using pkg_resources
ii  python-six                                                  1.14.0-2                                   all          Python 2 and 3 compatibility library (Python 2 interface)
ii  python-soupsieve                                            1.9.5+dfsg-1                               all          Modern CSS selector implementation for BeautifulSoup (Python 2.7)
ii  python-webencodings                                         0.5.1-1ubuntu1                             all          Python implementation of the WHATWG Encoding standard
ii  python2                                                     2.7.17-2ubuntu4                            amd64        interactive high-level object-oriented language (Python2 version)
ii  python2-minimal                                             2.7.17-2ubuntu4                            amd64        minimal subset of the Python2 language
ii  python2.7                                                   2.7.18-1~20.04.1                           amd64        Interactive high-level object-oriented language (version 2.7)
ii  python2.7-minimal                                           2.7.18-1~20.04.1                           amd64        Minimal subset of the Python language (version 2.7)
ii  python3                                                     3.8.2-0ubuntu2                             amd64        interactive high-level object-oriented language (default python3 version)
ii  python3-apport                                              2.20.11-0ubuntu27.21                       all          Python 3 library for Apport crash report handling
ii  python3-apt                                                 2.0.0ubuntu0.20.04.6                       amd64        Python 3 interface to libapt-pkg
ii  python3-aptdaemon                                           1.1.1+bzr982-0ubuntu32.3                   all          Python 3 module for the server and client of aptdaemon
ii  python3-aptdaemon.gtk3widgets                               1.1.1+bzr982-0ubuntu32.3                   all          Python 3 GTK+ 3 widgets to run an aptdaemon client
ii  python3-attr                                                19.3.0-2                                   all          Attributes without boilerplate (Python 3)
ii  python3-automat                                             0.8.0-1ubuntu1                             all          Self-service finite-state machines for the programmer on the go
ii  python3-blinker                                             1.4+dfsg1-0.3ubuntu1                       all          fast, simple object-to-object and broadcast signaling library
ii  python3-cairo:amd64                                         1.16.2-2ubuntu2                            amd64        Python3 bindings for the Cairo vector graphics library
ii  python3-certifi                                             2019.11.28-1                               all          root certificates for validating SSL certs and verifying TLS hosts (python3)
ii  python3-cffi-backend                                        1.14.0-1build1                             amd64        Foreign Function Interface for Python 3 calling C code - runtime
ii  python3-chardet                                             3.0.4-4build1                              all          universal character encoding detector for Python3
ii  python3-click                                               7.0-3                                      all          Wrapper around optparse for command line utilities - Python 3.x
ii  python3-colorama                                            0.4.3-1build1                              all          Cross-platform colored terminal text in Python - Python 3.x
ii  python3-commandnotfound                                     20.04.4                                    all          Python 3 bindings for command-not-found.
ii  python3-configobj                                           5.0.6-4                                    all          simple but powerful config file reader and writer for Python 3
ii  python3-constantly                                          15.1.0-1build1                             all          Symbolic constants in Python
ii  python3-crypto                                              2.6.1-13ubuntu2                            amd64        cryptographic algorithms and protocols for Python 3
ii  python3-cryptography                                        2.8-3ubuntu0.1                             amd64        Python library exposing cryptographic recipes and primitives (Python 3)
ii  python3-cups                                                1.9.73-3build1                             amd64        Python3 bindings for CUPS
ii  python3-cupshelpers                                         1.5.12-0ubuntu1.1                          all          Python utility modules around the CUPS printing system
ii  python3-dbus                                                1.2.16-1build1                             amd64        simple interprocess messaging system (Python 3 interface)
ii  python3-debconf                                             1.5.73                                     all          interact with debconf from Python 3
ii  python3-debian                                              0.1.36ubuntu1                              all          Python 3 modules to work with Debian-related data formats
ii  python3-defer                                               1.0.6-2.1                                  all          Small framework for asynchronous programming (Python 3)
ii  python3-dev                                                 3.8.2-0ubuntu2                             amd64        header files and a static library for Python (default)
ii  python3-distro                                              1.4.0-1                                    all          Linux OS platform information API
ii  python3-distro-info                                         0.23ubuntu1                                all          information about distributions' releases (Python 3 module)
ii  python3-distupgrade                                         1:20.04.36                                 all          manage release upgrades
ii  python3-distutils                                           3.8.10-0ubuntu1~20.04                      all          distutils package for Python 3.x
ii  python3-entrypoints                                         0.3-2ubuntu1                               all          Discover and load entry points from installed packages (Python 3)
ii  python3-gdbm:amd64                                          3.8.10-0ubuntu1~20.04                      amd64        GNU dbm database support for Python 3.x
ii  python3-gi                                                  3.36.0-1                                   amd64        Python 3 bindings for gobject-introspection libraries
ii  python3-gi-cairo                                            3.36.0-1                                   amd64        Python 3 Cairo bindings for the GObject library
ii  python3-gpg                                                 1.13.1-7ubuntu2                            amd64        Python interface to the GPGME GnuPG encryption library (Python 3)
ii  python3-hamcrest                                            1.9.0-3                                    all          Hamcrest framework for matcher objects (Python 3)
ii  python3-httplib2                                            0.14.0-1ubuntu1                            all          comprehensive HTTP client library written for Python3
ii  python3-hyperlink                                           19.0.0-1                                   all          Immutable, Pythonic, correct URLs.
ii  python3-ibus-1.0                                            1.5.22-2ubuntu2.1                          all          Intelligent Input Bus - introspection overrides for Python (Python 3)
ii  python3-idna                                                2.8-1                                      all          Python IDNA2008 (RFC 5891) handling (Python 3)
ii  python3-importlib-metadata                                  1.5.0-1                                    all          library to access the metadata for a Python package - Python 3.x
ii  python3-incremental                                         16.10.1-3.2                                all          Library for versioning Python projects.
ii  python3-jinja2                                              2.10.1-2                                   all          small but fast and easy to use stand-alone template engine
ii  python3-json-pointer                                        2.0-0ubuntu1                               all          resolve JSON pointers - Python 3.x
ii  python3-jsonpatch                                           1.23-3                                     all          library to apply JSON patches - Python 3.x
ii  python3-jsonschema                                          3.2.0-0ubuntu2                             all          An(other) implementation of JSON Schema (Draft 3 and 4) - Python 3.x
ii  python3-jwt                                                 1.7.1-2ubuntu2                             all          Python 3 implementation of JSON Web Token
ii  python3-keyring                                             18.0.1-2ubuntu1                            all          store and access your passwords safely - Python 3 version of the package
ii  python3-launchpadlib                                        1.10.13-1                                  all          Launchpad web services client library (Python 3)
ii  python3-lazr.restfulclient                                  0.14.2-2build1                             all          client for lazr.restful-based web services (Python 3)
ii  python3-lazr.uri                                            1.0.3-4build1                              all          library for parsing, manipulating, and generating URIs
ii  python3-ldb                                                 2:2.2.3-0ubuntu0.20.04.2                   amd64        Python 3 bindings for LDB
ii  python3-lib2to3                                             3.8.10-0ubuntu1~20.04                      all          Interactive high-level object-oriented language (lib2to3)
ii  python3-macaroonbakery                                      1.3.1-1                                    all          Higher-level macaroon operations for Python 3
ii  python3-markupsafe                                          1.1.0-1build2                              amd64        HTML/XHTML/XML string library for Python 3
ii  python3-minimal                                             3.8.2-0ubuntu2                             amd64        minimal subset of the Python language (default python3 version)
ii  python3-more-itertools                                      4.2.0-1build1                              all          library with routines for operating on iterables, beyond itertools (Python 3)
ii  python3-nacl                                                1.3.0-5                                    amd64        Python bindings to libsodium (Python 3)
ii  python3-netifaces                                           0.10.4-1ubuntu4                            amd64        portable network interface information - Python 3.x
ii  python3-newt:amd64                                          0.52.21-4ubuntu2                           amd64        NEWT module for Python3
ii  python3-oauthlib                                            3.1.0-1ubuntu2                             all          generic, spec-compliant implementation of OAuth for Python3
ii  python3-openssl                                             19.0.0-1build1                             all          Python 3 wrapper around the OpenSSL library
ii  python3-pexpect                                             4.6.0-1build1                              all          Python 3 module for automating interactive applications
ii  python3-pip                                                 20.0.2-5ubuntu1.6                          all          Python package installer
ii  python3-pkg-resources                                       45.2.0-1                                   all          Package Discovery and Resource Access using pkg_resources
ii  python3-problem-report                                      2.20.11-0ubuntu27.21                       all          Python 3 library to handle problem reports
ii  python3-protobuf                                            3.6.1.3-2ubuntu5                           amd64        Python 3 bindings for protocol buffers
ii  python3-psutil                                              5.5.1-1ubuntu4                             amd64        module providing convenience functions for managing processes (Python3)
ii  python3-ptyprocess                                          0.6.0-1ubuntu1                             all          Run a subprocess in a pseudo terminal from Python 3
ii  python3-pyasn1                                              0.4.2-3build1                              all          ASN.1 library for Python (Python 3 module)
ii  python3-pyasn1-modules                                      0.2.1-0.2build1                            all          Collection of protocols modules written in ASN.1 language (Python 3)
ii  python3-pygments                                            2.3.1+dfsg-1ubuntu2.2                      all          syntax highlighting package written in Python 3
ii  python3-pymacaroons                                         0.13.0-3                                   all          Macaroon library for Python 3
ii  python3-pyrsistent:amd64                                    0.15.5-1build1                             amd64        persistent/functional/immutable data structures for Python
ii  python3-requests                                            2.22.0-2ubuntu1                            all          elegant and simple HTTP library for Python3, built for human beings
ii  python3-requests-unixsocket                                 0.2.0-2                                    all          Use requests to talk HTTP via a UNIX domain socket - Python 3.x
ii  python3-rfc3339                                             1.1-2                                      all          parser and generator of RFC 3339-compliant timestamps (Python 3)
ii  python3-samba                                               2:4.13.14+dfsg-0ubuntu0.20.04.4            amd64        Python 3 bindings for Samba
ii  python3-secretstorage                                       2.3.1-2ubuntu1                             all          Python module for storing secrets - Python 3.x version
ii  python3-serial                                              3.4-5.1                                    all          pyserial - module encapsulating access for the serial port
ii  python3-service-identity                                    18.1.0-5build1                             all          Service identity verification for pyOpenSSL (Python 3 module)
ii  python3-setuptools                                          45.2.0-1                                   all          Python3 Distutils Enhancements
ii  python3-simplejson                                          3.16.0-2ubuntu2                            amd64        simple, fast, extensible JSON encoder/decoder for Python 3.x
ii  python3-six                                                 1.14.0-2                                   all          Python 2 and 3 compatibility library (Python 3 interface)
ii  python3-software-properties                                 0.99.9.8                                   all          manage the repositories that you install software from
ii  python3-systemd                                             234-3build2                                amd64        Python 3 bindings for systemd
ii  python3-talloc:amd64                                        2.3.1-0ubuntu0.20.04.1                     amd64        hierarchical pool based memory allocator - Python3 bindings
ii  python3-tdb                                                 1.4.3-0ubuntu0.20.04.1                     amd64        Python3 bindings for TDB
ii  python3-twisted                                             18.9.0-11ubuntu0.20.04.1                   all          Event-based framework for internet applications
ii  python3-twisted-bin:amd64                                   18.9.0-11ubuntu0.20.04.1                   amd64        Event-based framework for internet applications
ii  python3-tz                                                  2019.3-1                                   all          Python3 version of the Olson timezone database
ii  python3-update-manager                                      1:20.04.10.9                               all
python 3.x module for update-manager
ii  python3-urllib3                                             1.25.8-2ubuntu0.1                          all          HTTP library with thread-safe connection pooling for Python3
ii  python3-venv                                                3.8.2-0ubuntu2                             amd64        pyvenv-3 binary for python3 (default python3 version)
ii  python3-wadllib                                             1.3.3-3build1                              all          Python 3 library for navigating WADL files
ii  python3-wheel                                               0.34.2-1                                   all          built-package format for Python
ii  python3-xdg                                                 0.26-1ubuntu1                              all          Python 3 library to access freedesktop.org standards
ii  python3-yaml                                                5.3.1-1ubuntu0.1                           amd64        YAML parser and emitter for Python3
ii  python3-zipp                                                1.0.0-1                                    all          pathlib-compatible Zipfile object wrapper - Python 3.x
ii  python3-zope.interface                                      4.7.1-1                                    amd64        Interfaces for Python3
ii  python3.8                                                   3.8.10-0ubuntu1~20.04.1                    amd64        Interactive high-level object-oriented language (version 3.8)
ii  python3.8-dev                                               3.8.10-0ubuntu1~20.04.1                    amd64        Header files and a static library for Python (v3.8)
ii  python3.8-minimal                                           3.8.10-0ubuntu1~20.04.1                    amd64        Minimal subset of the Python language (version 3.8)
ii  python3.8-venv                                              3.8.10-0ubuntu1~20.04.1                    amd64        Interactive high-level object-oriented language (pyvenv binary, version 3.8)

@treeswift
Copy link
Author

$ pip3 list
Package                Version
---------------------- --------------------
attrs                  19.3.0
Automat                0.8.0
blinker                1.4
certifi                2019.11.28
chardet                3.0.4
Click                  7.0
cloud-init             21.4
colorama               0.4.3
command-not-found      0.3
configobj              5.0.6
constantly             15.1.0
cryptography           2.8
cupshelpers            1.0
dbus-python            1.2.16
defer                  1.0.6
distro                 1.4.0
distro-info            0.23ubuntu1
entrypoints            0.3
gpg                    1.13.1-unknown
httplib2               0.14.0
hyperlink              19.0.0
idna                   2.8
importlib-metadata     1.5.0
incremental            16.10.1
Jinja2                 2.10.1
jsonpatch              1.22
jsonpointer            2.0
jsonschema             3.2.0
keyring                18.0.1
language-selector      0.1
launchpadlib           1.10.13
lazr.restfulclient     0.14.2
lazr.uri               1.0.3
macaroonbakery         1.3.1
Mako                   1.1.6
MarkupSafe             1.1.0
meson                  0.60.2
more-itertools         4.2.0
netifaces              0.10.4
oauthlib               3.1.0
pexpect                4.6.0
pip                    20.0.2
protobuf               3.6.1
psutil                 5.5.1
pyasn1                 0.4.2
pyasn1-modules         0.2.1
pycairo                1.16.2
pycrypto               2.6.1
pycups                 1.9.73
Pygments               2.3.1
PyGObject              3.36.0
PyHamcrest             1.9.0
PyJWT                  1.7.1
pymacaroons            0.13.0
PyNaCl                 1.3.0
pyOpenSSL              19.0.0
pyRFC3339              1.1
pyrsistent             0.15.5
pyserial               3.4
python-apt             2.0.0+ubuntu0.20.4.6
python-debian          0.1.36ubuntu1
pytz                   2019.3
pyxdg                  0.26
PyYAML                 5.3.1
requests               2.22.0
requests-unixsocket    0.2.0
SecretStorage          2.3.1
service-identity       18.1.0
setuptools             45.2.0
simplejson             3.16.0
six                    1.14.0
sos                    4.1
ssh-import-id          5.10
systemd-python         234
Twisted                18.9.0
ubuntu-advantage-tools 27.4
ufw                    0.36
unattended-upgrades    0.1
urllib3                1.25.8
wadllib                1.3.3
wheel                  0.34.2
zipp                   1.0.0
zope.interface         4.7.1

@treeswift
Copy link
Author

Would be helpful to see yours, and also the contents of your target include/GLES2 directory.

@pahaze
Copy link
Member

pahaze commented Jan 8, 2022

Let me rebuild everything real quick, I'm on my laptop

@pahaze
Copy link
Member

pahaze commented Jan 8, 2022

Before I do this though, the .inc file is the only file causing issues. gl2ext.h is fine. I don't know why it's using the .inc file.

@treeswift
Copy link
Author

I don't know why it's using the .inc file.

Because gl2ext.h includes it:

In file included from /home/pahaze/mxe/src/angle-test.cpp:222:
In file included from /home/pahaze/mxe/usr/armv7-w64-mingw32/include/GLES2/gl2ext.h:3943:
In file included from /home/pahaze/mxe/usr/armv7-w64-mingw32/include/GLES2/gl2ext_angle.h:417:
/home/pahaze/mxe/usr/armv7-w64-mingw32/include/GLES2/gl2ext_explicit_context_autogen.inc:182:92: error: unknown type name 'GLDEBUGPROCKHR'; did you mean 'EGLDEBUGPROCKHR'?

gl2ext.h contains stable standard API while the more flexible *.inc contains ANGLE-specific extensions. So the former is maintained manually (as version-controlled, reviewable code) while the latter can be autogenerated.

@pahaze
Copy link
Member

pahaze commented Jan 8, 2022

Ohhh. I see.

@pahaze
Copy link
Member

pahaze commented Jan 8, 2022

Interesting. On my laptop, it can not even configure.

image

@pahaze
Copy link
Member

pahaze commented Jan 8, 2022

zlib wasn't found. We should proooobably add zlib to the $(PKG)_DEPS. (After building zlib, it configures fine.)

@treeswift
Copy link
Author

treeswift commented Jan 8, 2022

We should proooobably add zlib to the $(PKG)_DEPS.

Host or target? On the target it uses (is expected to use) google_zlib, which is downloaded into mxe/resources.

@pahaze
Copy link
Member

pahaze commented Jan 8, 2022

Target. CMake looks for the other zlib still, causing the error.

@treeswift
Copy link
Author

Then the right fix would be pointing CMake to its third_party subfolder. Unless we examine the diff between zlib and google_zlib and find that everything from google_* has been upstreamed.

@treeswift
Copy link
Author

For now, let's see what's different about the *.inc generation tho.

@pahaze
Copy link
Member

pahaze commented Jan 8, 2022

Right. Once this build completes, I'll send logs of all of the things that you sent.

@pahaze
Copy link
Member

pahaze commented Jan 8, 2022

grep without lines:

❯ grep GLDEBUGPROC usr/armv7-w64-mingw32/include/GLES2/*.h
usr/armv7-w64-mingw32/include/GLES2/gl2ext.h:typedef void (GL_APIENTRY  *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
usr/armv7-w64-mingw32/include/GLES2/gl2ext.h:typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);
usr/armv7-w64-mingw32/include/GLES2/gl2ext.h:GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);

grep with lines:

❯ grep -n GLDEBUGPROC usr/armv7-w64-mingw32/include/GLES2/*.h
usr/armv7-w64-mingw32/include/GLES2/gl2ext.h:70:typedef void (GL_APIENTRY  *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
usr/armv7-w64-mingw32/include/GLES2/gl2ext.h:114:typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);
usr/armv7-w64-mingw32/include/GLES2/gl2ext.h:126:GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);

Python environment:

❯ dpkg --list | grep python
ii  libboost-python1.74.0                         1.74.0-8ubuntu6                                       amd64        Boost.Python Library
ii  libpython3-dev:amd64                          3.9.4-1build1                                         amd64        header files and a static library for Python (default)
ii  libpython3-stdlib:amd64                       3.9.4-1build1                                         amd64        interactive high-level object-oriented language (default python3 version)
ii  libpython3.9:amd64                            3.9.7-2build1                                         amd64        Shared Python runtime library (version 3.9)
ii  libpython3.9-dev:amd64                        3.9.7-2build1                                         amd64        Header files and a static library for Python (v3.9)
ii  libpython3.9-minimal:amd64                    3.9.7-2build1                                         amd64        Minimal subset of the Python language (version 3.9)
ii  libpython3.9-stdlib:amd64                     3.9.7-2build1                                         amd64        Interactive high-level object-oriented language (standard library, version 3.9)
ii  python-apt-common                             2.2.1pop0~1628521831~21.10~5dbe6cf                    all          Python interface to libapt-pkg (locales)
ii  python-is-python3                             3.9.2-1                                               all          symlinks /usr/bin/python to python3
ii  python-pip-whl                                20.3.4-4                                              all          Python package installer (pip wheels)
ii  python3                                       3.9.4-1build1                                         amd64        interactive high-level object-oriented language (default python3 version)
ii  python3-apport                                2.20.11-0ubuntu71                                     all          Python 3 library for Apport crash report handling
ii  python3-apt                                   2.2.1pop0~1628521831~21.10~5dbe6cf                    amd64        Python 3 interface to libapt-pkg
ii  python3-aptdaemon                             1.1.1+bzr982-0ubuntu36                                all          Python 3 module for the server and client of aptdaemon
ii  python3-aptdaemon.gtk3widgets                 1.1.1+bzr982-0ubuntu36                                all          Python 3 GTK+ 3 widgets to run an aptdaemon client
ii  python3-bcrypt                                3.1.7-4                                               amd64        password hashing library for Python 3
ii  python3-blinker                               1.4+dfsg1-0.3ubuntu2                                  all          fast, simple object-to-object and broadcast signaling library
ii  python3-bluez                                 0.23-3build1                                          amd64        Python 3 wrappers around BlueZ for rapid bluetooth development
ii  python3-brlapi:amd64                          6.3+dfsg-1ubuntu2                                     amd64        Braille display access via BRLTTY - Python3 bindings
ii  python3-bs4                                   4.9.3-1                                               all          error-tolerant HTML parser for Python 3
ii  python3-cairo:amd64                           1.16.2-4build2                                        amd64        Python3 bindings for the Cairo vector graphics library
ii  python3-certifi                               2020.6.20-1                                           all          root certificates for validating SSL certs and verifying TLS hosts (python3)
ii  python3-cffi-backend:amd64                    1.14.6-1build1                                        amd64        Foreign Function Interface for Python 3 calling C code - runtime
ii  python3-chardet                               4.0.0-1                                               all          universal character encoding detector for Python3
ii  python3-click                                 7.1.2-1                                               all          Wrapper around optparse for command line utilities - Python 3.x
ii  python3-colorama                              0.4.4-1                                               all          Cross-platform colored terminal text in Python - Python 3.x
ii  python3-commandnotfound                       21.10.0                                               all          Python 3 bindings for command-not-found.
ii  python3-cryptography                          3.3.2-1                                               amd64        Python library exposing cryptographic recipes and primitives (Python 3)
ii  python3-cups:amd64                            2.0.1-4build1                                         amd64        Python3 bindings for CUPS
ii  python3-cupshelpers                           1.5.15-0ubuntu2                                       all          Python utility modules around the CUPS printing system
ii  python3-dbus                                  1.2.16-5                                              amd64        simple interprocess messaging system (Python 3 interface)
ii  python3-debian                                0.1.39ubuntu1                                         all          Python 3 modules to work with Debian-related data formats
ii  python3-defer                                 1.0.6-2.1                                             all          Small framework for asynchronous programming (Python 3)
ii  python3-dev                                   3.9.4-1build1                                         amd64        header files and a static library for Python (default)
ii  python3-dialog                                3.5.1-1                                               all          Python module for making simple terminal-based user interfaces
ii  python3-distro                                1.5.0-1                                               all          Linux OS platform information API
ii  python3-distutils                             3.9.7-1                                               all          distutils package for Python 3.x
ii  python3-dnspython                             2.0.0+really1.16.0-2ubuntu2                           all          DNS toolkit for Python 3
ii  python3-ecdsa                                 0.16.1-1                                              all          ECDSA cryptographic signature library (Python 3)
ii  python3-gattlib                               0~20201113-1                                          amd64        Bluetooth LE GATT library for Python 3
ii  python3-gdbm:amd64                            3.9.7-1                                               amd64        GNU dbm database support for Python 3.x
ii  python3-gi                                    3.40.1-1build1                                        amd64        Python 3 bindings for gobject-introspection libraries
ii  python3-gi-cairo                              3.40.1-1build1                                        amd64        Python 3 Cairo bindings for the GObject library
ii  python3-gnupg                                 0.4.6-1                                               all          Python wrapper for the GNU Privacy Guard (Python 3.x)
ii  python3-gst-1.0                               1.18.5-1                                              amd64        GStreamer GObject Introspection overrides for Python (Python 3)
ii  python3-html5lib                              1.1-3                                                 all          HTML parser/tokenizer based on the WHATWG HTML5 specification
ii  python3-httplib2                              0.18.1-3ubuntu1                                       all          comprehensive HTTP client library written for Python3
ii  python3-ibus-1.0                              1.5.25-2build1                                        all          Intelligent Input Bus - introspection overrides for Python (Python 3)
ii  python3-idna                                  2.10-1                                                all          Python IDNA2008 (RFC 5891) handling (Python 3)
ii  python3-importlib-metadata                    4.0.1-1                                               all          library to access the metadata for a Python package - Python 3.x
ii  python3-jeepney                               0.7.1-1                                               all          pure Python D-Bus interface
ii  python3-jinja2                                2.11.3-1                                              all          small but fast and easy to use stand-alone template engine
ii  python3-jwt                                   1.7.1-2ubuntu2                                        all          Python 3 implementation of JSON Web Token
ii  python3-keyring                               23.0.1-1                                              all          store and access your passwords safely
ii  python3-launchpadlib                          1.10.13-1                                             all          Launchpad web services client library (Python 3)
ii  python3-lazr.restfulclient                    0.14.2-2build1                                        all          client for lazr.restful-based web services (Python 3)
ii  python3-lazr.uri                              1.0.5-1                                               all          library for parsing, manipulating, and generating URIs
ii  python3-ldb                                   2:2.2.3-0ubuntu0.21.10.2                              amd64        Python 3 bindings for LDB
ii  python3-lib2to3                               3.9.7-1                                               all          Interactive high-level object-oriented language (lib2to3)
ii  python3-louis                                 3.18.0-1                                              all          Python bindings for liblouis
ii  python3-lxml:amd64                            4.6.3+dfsg-0.1                                        amd64        pythonic binding for the libxml2 and libxslt libraries
ii  python3-macaroonbakery                        1.3.1-1                                               all          Higher-level macaroon operations for Python 3
ii  python3-markupsafe                            1.1.1-1build2                                         amd64        HTML/XHTML/XML string library for Python 3
ii  python3-minimal                               3.9.4-1build1                                         amd64        minimal subset of the Python language (default python3 version)
ii  python3-more-itertools                        4.2.0-3                                               all          library with routines for operating on iterables, beyond itertools (Python 3)
ii  python3-nacl                                  1.4.0-1build1                                         amd64        Python bindings to libsodium (Python 3)
ii  python3-netifaces                             0.10.9-0.2                                            amd64        portable network interface information - Python 3.x
ii  python3-oauthlib                              3.1.0-2                                               all          generic, spec-compliant implementation of OAuth for Python3
ii  python3-olefile                               0.46-3                                                all          Python module to read/write MS OLE2 files
ii  python3-openssl                               20.0.1-1                                              all          Python 3 wrapper around the OpenSSL library
ii  python3-pil:amd64                             8.1.2+dfsg-0.3                                        amd64        Python Imaging Library (Python3)
ii  python3-pip                                   20.3.4-4                                              all          Python package installer
ii  python3-pkg-resources                         52.0.0-4                                              all          Package Discovery and Resource Access using pkg_resources
ii  python3-problem-report                        2.20.11-0ubuntu71                                     all          Python 3 library to handle problem reports
ii  python3-protobuf                              3.12.4-1ubuntu3                                       amd64        Python 3 bindings for protocol buffers
ii  python3-proton-client                         0.7.1-2                                               all          Proton SRP (Python 3)
ii  python3-protonvpn-nm-lib                      3.7.0-6                                               all          ProtonVPN NM library (Python 3)
ii  python3-psutil                                5.8.0-1                                               amd64        module providing convenience functions for managing processes (Python3)
ii  python3-pyatspi                               2.38.1-1                                              all          Assistive Technology Service Provider Interface - Python3 bindings
ii  python3-pycryptodome                          3.9.7+dfsg1-1build3                                   amd64        cryptographic Python library (Python 3)
ii  python3-pydbus                                0.6.0-4                                               all          Pythonic D-Bus library (Python 3)
ii  python3-pymacaroons                           0.13.0-4                                              all          Macaroon library for Python 3
ii  python3-pyqt5                                 5.15.4+dfsg-3                                         amd64        Python 3 bindings for Qt5
ii  python3-pyqt5.sip                             12.9.0-1                                              amd64        runtime module for Python extensions using SIP
ii  python3-pyudev                                0.22.0-2                                              all          Python3 bindings for libudev
ii  python3-pyxattr:amd64                         0.7.2-1ubuntu2                                        amd64        module for manipulating filesystem extended attributes (Python3)
ii  python3-repolib                               1.5.2~1630340924~21.10~3d11f10                        all          Repository Management for APT in Python (Python 3)
ii  python3-requests                              2.25.1+dfsg-2                                         all          elegant and simple HTTP library for Python3, built for human beings
ii  python3-rfc3339                               1.1-2                                                 all          parser and generator of RFC 3339-compliant timestamps (Python 3)
ii  python3-sdl2                                  0.9.7+dfsg1-1                                         all          Python bindings to the SDL2 C-library (Python 3 build)
ii  python3-secretstorage                         3.3.1-1                                               all          Python module for storing secrets - Python 3.x version
ii  python3-setuptools                            52.0.0-4                                              all          Python3 Distutils Enhancements
ii  python3-simplejson                            3.17.2-1                                              amd64        simple, fast, extensible JSON encoder/decoder for Python 3.x
ii  python3-six                                   1.16.0-2                                              all          Python 2 and 3 compatibility library (Python 3 interface)
ii  python3-software-properties                   0.99.13.1                                             all          manage the repositories that you install software from
ii  python3-soupsieve                             2.2.1-2                                               all          modern CSS selector implementation for BeautifulSoup (Python 3)
ii  python3-speechd                               0.10.2-2build1                                        all          Python interface to Speech Dispatcher
ii  python3-systemd                               234-3build4                                           amd64        Python 3 bindings for systemd
ii  python3-talloc:amd64                          2.3.1-2ubuntu2                                        amd64        hierarchical pool based memory allocator - Python3 bindings
ii  python3-tz                                    2021.1-1                                              all          Python3 version of the Olson timezone database
ii  python3-uno                                   1:7.2.3-0ubuntu0.21.10.1                              amd64        Python-UNO bridge
ii  python3-urllib3                               1.26.5-1~exp1                                         all          HTTP library with thread-safe connection pooling for Python3
ii  python3-wadllib                               1.3.5-1                                               all          Python 3 library for navigating WADL files
ii  python3-webencodings                          0.5.1-2                                               all          Python implementation of the WHATWG Encoding standard
ii  python3-wheel                                 0.34.2-1                                              all          built-package format for Python
ii  python3-xapian                                1.4.18-1                                              amd64        Xapian search engine interface for Python3
ii  python3-xdg                                   0.27-2                                                all          Python 3 library to access freedesktop.org standards
ii  python3-xkit                                  0.5.0ubuntu4                                          all          library for the manipulation of xorg.conf files (Python 3)
ii  python3-xlib                                  0.29-1                                                all          interface for Python 3 to the X11 protocol
ii  python3-yaml                                  5.3.1-5                                               amd64        YAML parser and emitter for Python3
ii  python3-zipp                                  1.0.0-3                                               all          pathlib-compatible Zipfile object wrapper - Python 3.x
ii  python3.9                                     3.9.7-2build1                                         amd64        Interactive high-level object-oriented language (version 3.9)
ii  python3.9-dev                                 3.9.7-2build1                                         amd64        Header files and a static library for Python (v3.9)
ii  python3.9-minimal                             3.9.7-2build1                                         amd64        Minimal subset of the Python language (version 3.9)

pip3 list:

pip3 list
Package                Version
---------------------- ----------------------------------
anyio                  3.4.0
apt-xapian-index       0.49
arrow                  0.17.0
bcrypt                 3.1.7
beautifulsoup4         4.9.3
blinker                1.4
Brlapi                 0.8.2
certifi                2020.6.20
chardet                4.0.0
charset-normalizer     2.0.8
chrome-gnome-shell     0.0.0
click                  7.1.2
colorama               0.4.4
command-not-found      0.3
cryptography           3.3.2
cupshelpers            1.0
dbus-python            1.2.16
defer                  1.0.6
distro                 1.5.0
dnspython              1.16.0
ecdsa                  0.16.1
Faker                  5.8.0
fuzzywuzzy             0.18.0
gattlib                0.20201113
h11                    0.12.0
hidpidaemon            18.4.6
html5lib               1.1
httpcore               0.14.3
httplib2               0.18.1
httpx                  0.21.1
idna                   2.10
importlib-metadata     4.0.1
jeepney                0.7.1
Jinja2                 2.11.3
Js2Py                  0.71
kernelstub             3.1.4
keyring                23.0.1
kurby                  0.3.3
language-selector      0.1
launchpadlib           1.10.13
lazr.restfulclient     0.14.2
lazr.uri               1.0.5
louis                  3.18.0
lxml                   4.6.3
macaroonbakery         1.3.1
MarkupSafe             1.1.1
meson                  0.56.2
more-itertools         4.2.0
netifaces              0.10.9
oauthlib               3.1.0
olefile                0.46
onboard                1.4.1
Pillow                 8.1.2
pip                    20.3.4
pop-transition         1.1.2
prompt-toolkit         1.0.14
protobuf               3.12.4
proton-client          0.7.1
protonvpn-cli          3.11.0
protonvpn-gui          1.7.0
protonvpn-nm-lib       3.7.0
psutil                 5.8.0
PyBluez                0.23
pycairo                1.16.2
pycryptodomex          3.9.7
pycups                 2.0.1
pydantic               1.8.2
pydbus                 0.6.0
Pygments               2.10.0
PyGObject              3.40.1
PyInquirer             1.0.3
pyjsparser             2.7.1
PyJWT                  1.7.1
pymacaroons            0.13.0
PyNaCl                 1.4.0
pyOpenSSL              20.0.1
PyQt5                  5.15.4
PyQt5-sip              12.9.0
pyRFC3339              1.1
PySDL2                 0.9.7
python-apt             2.2.1pop0-1628521831-21.10-5dbe6cf
python-dateutil        2.8.2
python-debian          0.1.39ubuntu1
python-gnupg           0.4.6
python-xlib            0.29
pythondialog           3.5.1
pytz                   2021.1
pytz-deprecation-shim  0.1.0.post0
pyudev                 0.22.0
pyxattr                0.7.2
pyxdg                  0.27
PyYAML                 5.3.1
regex                  2021.11.10
repolib                1.5.2
repoman                1.4.0
requests               2.25.1
rfc3986                1.5.0
SecretStorage          3.3.1
sessioninstaller       0.0.0
setuptools             52.0.0
shellingham            1.4.0
simplejson             3.17.2
six                    1.16.0
sniffio                1.2.0
soupsieve              2.2.1
systemd-python         234
tenacity               6.3.1
text-unidecode         1.3
tqdm                   4.62.3
typer                  0.3.2
typer-cli              0.0.12
typing-extensions      4.0.0
tzdata                 2021.5
tzlocal                4.1
ubuntu-advantage-tools 27.4
ubuntu-drivers-common  0.0.0
ufw                    0.36.1
urllib3                1.26.5
wadllib                1.3.5
wcwidth                0.2.5
webencodings           0.5.1
wheel                  0.34.2
xdg                    5
xkit                   0.0.0
youtube-dl             2021.6.6
zipp                   1.0.0

@treeswift
Copy link
Author

The typedef is there. Does the sample still fail to build?

@pahaze
Copy link
Member

pahaze commented Jan 8, 2022

No, but because that sed command is there 😂. Let me remove it.

@pahaze
Copy link
Member

pahaze commented Jan 8, 2022

By the way, should we move this into a separate issue?

@treeswift
Copy link
Author

Sure.

@pahaze
Copy link
Member

pahaze commented Jan 8, 2022

Alright. Am I creating it or you? By the way, the build works fine on my laptop. Desktop seems to be the culprit of issues... But I can't imagine why. The build environment is the exact same.

@treeswift
Copy link
Author

Forked 3 outstanding issues. This one can be closed I think.

@pahaze
Copy link
Member

pahaze commented Jan 8, 2022

Got it. Thanks. We'll re-open if needbe.

@pahaze pahaze closed this as completed Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants