redhat-developer / vscode-xml

Editing XML in Visual Studio Code made easy
Eclipse Public License 2.0
262 stars 82 forks source link

Alpine support #989

Closed cirolosapio closed 7 months ago

cirolosapio commented 7 months ago
rgrunber commented 7 months ago

Yup! this is almost exactly what I had locally. Still haven't fully tested though. I think https://github.com/redhat-developer/vscode-xml/pull/989/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34L119 also needs to become lemminx-{linux,alpine} because the generated binary take the name of the matrix.label.

rgrunber commented 7 months ago

Ran the build on my fork. Ran into :

https://github.com/rgrunber/vscode-xml/actions/runs/8787602380/job/24113202379

UnixNativeDispatcher.c:(.text.Java_sun_nio_fs_UnixNativeDispatcher_mknod0+0x44): undefined reference to `__xmknod'
collect2: error: ld returned 1 exit status

Looks like this is known upstream https://github.com/oracle/graal/issues/5814. Workaround is to use ubuntu-20.04 as opposed to 22.04. So we can bump the regular linux build to 22.04 and set the alpine (static) one to 20.04. It worked for me on https://github.com/rgrunber/vscode-xml/actions/runs/8787820638 (release failure is just because I'm using fake credentials, so can't publish from there).

If you can make the following change (assuming you agree with it) : https://github.com/rgrunber/vscode-xml/commit/d65dab9

Update: I don't think we can bump the regular Linux build to 22.04 due to https://github.com/redhat-developer/vscode-xml/issues/916#issuecomment-1630739626. Basically API changes to glibc prevent us from building on a newer builder in order to be comptaible with older distro (that have glibc < 2.34).

cirolosapio commented 7 months ago

reopened #991

rgrunber commented 7 months ago

I noticed the same issue.. for some reason when I tried doing a regular release, there was an issue uploading the artifact. I think your approach of making the label, the "primary key" is the right one. I guess I must have only tested when alpine was on ubuntu-20.04 and linux was on ubuntu-22.04, and never tried having both on the same value.

cirolosapio commented 7 months ago

with this approach it compiles the right binary https://github.com/cirolosapio/vscode-xml/actions/runs/8808258955/job/24177003106