Hi,
We're having an issue with the following module which is not in the list of tested packages: lwip.
Repro and deployment logs can be found here: https://github.com/Benjiiim/azure-appservice-test
I know from here and here that Azure App Service does not support all native modules and might fail at compiling those with very specific prerequisites.
However, any advice if this one should work or if we need to install more dependencies through the custom script would be greatly appreciated.
Repro:
{
"name": "azure-appservice-test",
"version": "1.0.0",
"description": "azure app service testing",
"engines": {
"node": ">=6.9.0 <7.0.0"
},
"dependencies": {
"lwip": "0.0.9"
}
}
Deployment logs: lwip_logs.txt
Thanks
We need to update the list of header files to include ones lwip needs.
@Benjiiim we made an update. Can you test your scenario again? Make sure you're running on a dedicated plan (i.e. not Free/Shared), as that's required for some aspects of native compilation.
Sorry @davidebbo for the late reply. I've tried to deploy again. It's better but the node-gyp rebuild still fails. You can find the new log here.
Strange, as I think it worked for Ahmed. He will take a look again when he gets back.
Any news @ahmelsayed ? Thanks a lot !
it certainly works for me. I don't see any compilation errors in your output. In fact I don't see any mention of compiling at all, what exactly failed there?
Also are you sure you were trying on a dedicated sku site? native compilers don't work in free or shared unfortunately.
npm WARN deprecated [email protected]: This package is discontinued. Use lodash@^4.0.0.
> [email protected] install D:\home\t\node_modules\lwip
> node-gyp rebuild
D:\home\t\node_modules\lwip>if not defined npm_config_node_gyp (node "D:\Program Files (x86)\npm\3.10.8\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
init.cpp
util.cpp
buffer_worker.cpp
jpeg_decoder.cpp
png_decoder.cpp
gif_decoder.cpp
win_delay_load_hook.cc
jmemnobs.c
jcomapi.c
jdapimin.c
jdapistd.c
jdatadst.c
jdatasrc.c
jdcoefct.c
jdcolor.c
jddctmgr.c
jdhuff.c
jdinput.c
jdmainct.c
jdmarker.c
jdmaster.c
jdpostct.c
jdsample.c
jerror.c
jfdctflt.c
jfdctfst.c
jfdctint.c
Compiling...
jidctflt.c
jidctfst.c
jidctint.c
jutils.c
jmemmgr.c
jdarith.c
jdmerge.c
jaricom.c
jquant1.c
jquant2.c
png.c
pngset.c
pngget.c
pngrutil.c
pngtrans.c
pngread.c
pngwrite.c
pngrio.c
pngrtran.c
pngmem.c
Compiling...
pngerror.c
pngpread.c
adler32.c
crc32.c
gzlib.c
gzread.c
infback.c
inflate.c
inftrees.c
inffast.c
uncompr.c
zutil.c
trees.c
dgif_lib.c
..\src\lib\gif\dgif_lib.c(379): warning C4018: '<': signed/unsigned mismatch [D:\home\t\node_modules\lwip\build\lwip_decoder.vcxproj]
gif_err.c
gifalloc.c
Creating library D:\home\t\node_modules\lwip\build\Release\lwip_decoder.lib and object D:\home\t\node_modules\lwip\build\Release\lwip_decoder.exp
Generating code
Finished generating code
lwip_decoder.vcxproj -> D:\home\t\node_modules\lwip\build\Release\\lwip_decoder.node
lwip_decoder.vcxproj -> D:\home\t\node_modules\lwip\build\Release\lwip_decoder.pdb (Full PDB)
init.cpp
..\src\encoder\init.cpp(8): warning C4244: 'initializing': conversion from 'int64_t' to 'std::size_t', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\encoder\init.cpp(9): warning C4244: 'initializing': conversion from 'int64_t' to 'std::size_t', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\encoder\init.cpp(10): warning C4244: 'initializing': conversion from 'int64_t' to 'int', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\encoder\init.cpp(28): warning C4244: 'initializing': conversion from 'int64_t' to 'std::size_t', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\encoder\init.cpp(29): warning C4244: 'initializing': conversion from 'int64_t' to 'std::size_t', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\encoder\init.cpp(30): warning C4244: 'initializing': conversion from 'int64_t' to 'int', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\encoder\init.cpp(65): warning C4244: 'initializing': conversion from 'int64_t' to 'std::size_t', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\encoder\init.cpp(66): warning C4244: 'initializing': conversion from 'int64_t' to 'std::size_t', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\encoder\init.cpp(67): warning C4244: 'initializing': conversion from 'int64_t' to 'int', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\encoder\init.cpp(68): warning C4244: 'initializing': conversion from 'int64_t' to 'int', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\encoder\init.cpp(71): warning C4244: 'initializing': conversion from 'int64_t' to 'int', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
jpeg_worker.cpp
png_worker.cpp
gif_worker.cpp
win_delay_load_hook.cc
jdatadst.c
jmemnobs.c
jcomapi.c
jerror.c
jfdctflt.c
jfdctfst.c
jfdctint.c
jidctflt.c
jidctfst.c
jidctint.c
jutils.c
jmemmgr.c
jaricom.c
jquant1.c
jquant2.c
jcapimin.c
jcapistd.c
jccoefct.c
jccolor.c
jcdctmgr.c
Compiling...
jchuff.c
jcinit.c
jcmainct.c
jcmarker.c
jcmaster.c
jcparam.c
jcprepct.c
jcsample.c
jcarith.c
png.c
pngset.c
pngget.c
pngtrans.c
pngmem.c
pngerror.c
pngread.c
pngwrite.c
pngwutil.c
pngwio.c
pngwtran.c
Compiling...
adler32.c
crc32.c
gzlib.c
zutil.c
gzwrite.c
compress.c
deflate.c
trees.c
egif_lib.c
..\src\lib\gif\egif_lib.c(473): warning C4028: formal parameter 2 different from declaration [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\lib\gif\egif_lib.c(878): warning C4028: formal parameter 3 different from declaration [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\lib\gif\egif_lib.c(966): warning C4028: formal parameter 2 different from declaration [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
gif_err.c
gifalloc.c
gif_hash.c
quantize.c
..\src\lib\gif\quantize.c(132): warning C4018: '<': signed/unsigned mismatch [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\lib\gif\quantize.c(141): warning C4018: '<': signed/unsigned mismatch [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\lib\gif\quantize.c(152): warning C4244: '=': conversion from 'long' to 'GifByteType', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\lib\gif\quantize.c(153): warning C4244: '=': conversion from 'long' to 'GifByteType', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
..\src\lib\gif\quantize.c(154): warning C4244: '=': conversion from 'long' to 'GifByteType', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_encoder.vcxproj]
Creating library D:\home\t\node_modules\lwip\build\Release\lwip_encoder.lib and object D:\home\t\node_modules\lwip\build\Release\lwip_encoder.exp
Generating code
Finished generating code
lwip_encoder.vcxproj -> D:\home\t\node_modules\lwip\build\Release\\lwip_encoder.node
lwip_encoder.vcxproj -> D:\home\t\node_modules\lwip\build\Release\lwip_encoder.pdb (Full PDB)
init.cpp
image.cpp
..\src\image\image.cpp(53): warning C4244: 'initializing': conversion from 'double' to 'std::size_t', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_image.vcxproj]
..\src\image\image.cpp(54): warning C4244: 'initializing': conversion from 'double' to 'std::size_t', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_image.vcxproj]
..\src\image\image.cpp(116): warning C4244: 'initializing': conversion from 'int64_t' to 'std::size_t', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_image.vcxproj]
..\src\image\image.cpp(117): warning C4244: 'initializing': conversion from 'int64_t' to 'std::size_t', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_image.vcxproj]
..\src\image\image.cpp(118): warning C4244: 'initializing': conversion from 'int64_t' to 'int', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_image.vcxproj]
resize_worker.cpp
rotate_worker.cpp
blur_worker.cpp
crop_worker.cpp
mirror_worker.cpp
pad_worker.cpp
sharpen_worker.cpp
hsla_worker.cpp
..\src\image\hsla_worker.cpp(31): warning C4244: '*=': conversion from 'double' to 'float', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_image.vcxproj]
..\src\image\hsla_worker.cpp(37): warning C4244: '*=': conversion from 'double' to 'float', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_image.vcxproj]
..\src\image\hsla_worker.cpp(43): warning C4244: '*=': conversion from 'double' to 'float', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_image.vcxproj]
..\src\image\hsla_worker.cpp(70): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_image.vcxproj]
..\src\image\hsla_worker.cpp(71): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_image.vcxproj]
..\src\image\hsla_worker.cpp(72): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_image.vcxproj]
opacify_worker.cpp
paste_worker.cpp
..\src\image\paste_worker.cpp(24): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_image.vcxproj]
..\src\image\paste_worker.cpp(25): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data [D:\home\t\node_modules\lwip\build\lwip_image.vcxproj]
setpixel_worker.cpp
win_delay_load_hook.cc
Creating library D:\home\t\node_modules\lwip\build\Release\lwip_image.lib and object D:\home\t\node_modules\lwip\build\Release\lwip_image.exp
Generating code
Finished generating code
lwip_image.vcxproj -> D:\home\t\node_modules\lwip\build\Release\\lwip_image.node
lwip_image.vcxproj -> D:\home\t\node_modules\lwip\build\Release\lwip_image.pdb (Full PDB)
[email protected] D:\home\t
`-- [email protected]
+-- [email protected]
| `-- [email protected]
+-- [email protected]
+-- [email protected]
| `-- [email protected]
`-- [email protected]
i don't believe this issue is building in kudu per se but it is a combination of deploying using vscode, building in kudu, and running in the azure app service environment. if there is a better place to submit an issue please let me know.
i am using vscode to deploy from git clone https://github.com/bmacnaughton/todo.git -b azure.
the target of the deployment is https://bam-todo.azurewebsites.net.
vscode indicates that the application loaded OK but that's not quite right. todo requires appoptics-apm which in turn requires an optional dependency appoptics-bindings and that fails to load. from the log it's not clear why appoptics-bindings failed to load, so i did a little investigation.
using ssh (deployment) and running node interactively i executed require('appoptics-bindings') and have found that the error (ssh) is that the loader believes liboboe-1.0.so.0 to be too short. liboboe-1.0.so.0 is a link (created during npm install) to one of two platform-dependent .so files - one for alpine and one for other linuxes. the file is the correct length.
if i use bash (kudu) and manually run npm install then go to ssh (deployment) i am able to load appoptics-bindings correctly (using node interactively).
it's odd to me that the kudu environment is running node v6 while my deployment target is node 10.15.1. and while kudu runs debian 8 the deployment uses debian 9.
(magically, this morning as i am typing this, after 8 attempts the last deployment succeeded. i'm still submitting this until i find that the deployment is repeatable.)