-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Cannot create delay load imports Section when Rebuild Native Modules on Windows #192
Comments
Any suggestion, thanks in advance! |
You may try the section Manual Patch in the same doc. It's a more reliable solution. |
Thanks caoccao, |
Which one did you patch? It needs to be the original one. |
Yes, it's original one. Before patch test is ok. node test-node\test-node-module-sqlite3-sync.js |
New versions of Node.js somehow break embedders' reusing the process. The current solution is to downgrade to an early version of Javet. Here are 2 similar issues for your reference. I'm not sure if the fix would be patching Node.js which I don't want to do. |
Which version of Javet to downgrade? |
I'm not sure. Could you try them respectively? In the meanwhile, I'll look into it once I have time. |
downgrade to Javet v0.9.14
|
SQLite version needs to be a little bit lower. |
I follow the steps in https://www.caoccao.com/Javet/reference/resource_management/modularization.html to rebuild sqlite3. The build process is successful, but the created file .node not contains delay load imports Section
Dump of file node_modules\sqlite3\lib\binding\napi-v3-win32-x64\node_sqlite3.node
File Type: DLL
Section contains the following imports:
process information:
gyp info it worked if it ends with ok
gyp info using node-gyp@9.2.0
gyp info using node@16.16.0 | win32 | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@9.2.0
gyp info using node@16.16.0 | win32 | x64
gyp info find Python using Python version 3.10.6 found at "C:\Users\XXX\AppData\Local\Programs\Python\Python310\python.exe"
gyp info find VS using VS2019 (16.11.32126.315) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Users\XXX\AppData\Local\Programs\Python\Python310\python.exe
gyp info spawn args [
gyp info spawn args 'C:\Users\XXX\AppData\Roaming\nvm\v16.16.0\node_modules\node-gyp\gyp\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'E:\javet\build\Javet\scripts\node\node_modules\sqlite3\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\XXX\AppData\Roaming\nvm\v16.16.0\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\XXX\AppData\Local\node-gyp\Cache\16.16.0\include\node\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\XXX\AppData\Local\node-gyp\Cache\16.16.0',
gyp info spawn args '-Dnode_gyp_dir=C:\Users\XXX\AppData\Roaming\nvm\v16.16.0\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\XXX\\AppData\\Local\\node-gyp\\Cache\\16.16.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=E:\javet\build\Javet\scripts\node\node_modules\sqlite3',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'E:\javet\build\Javet\scripts\node\node_modules\sqlite3\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
�[37;40mgyp�[0m �[0m�[32minfo�[0m �[0m�[35mok�[0m
�[0m
ROBOCOPY :: Windows 的可靠文件复制
开始时间: 2022年10月8日 11:07:13
源: E:\javet\build\Javet\scripts\node\node_modules\sqlite3\deps
目标: E:\javet\build\Javet\scripts\node\node_modules\sqlite3\build\deps\
100% 新文件 1322 common-sqlite.gypi
100% 新文件 224 extract.js
100% 新文件 2.9 m sqlite-autoconf-3390400.tar.gz
100% 新文件 3021 sqlite3.gyp
结束时间: 2022年10月8日 11:07:13
gyp info it worked if it ends with ok
gyp info using node-gyp@9.2.0
gyp info using node@16.16.0 | win32 | x64
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
gyp info spawn args [
gyp info spawn args 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“-m”开关。
win_delay_load_hook.cc
nothing.vcxproj -> E:\javet\build\Javet\scripts\node\node_modules\sqlite3\build\Release\nothing.lib
unpack_sqlite_dep
sqlite3.c
win_delay_load_hook.cc
sqlite3.vcxproj -> E:\javet\build\Javet\scripts\node\node_modules\sqlite3\build\Release\sqlite3.lib
backup.cc
database.cc
node_sqlite3.cc
statement.cc
win_delay_load_hook.cc
正在创建库 E:\javet\build\Javet\scripts\node\node_modules\sqlite3\build\Release\node_sqlite3.lib 和对象 E:\javet\build\Javet\scripts\node\node_modules\sqlite3\build\Release\node_sqlite3.exp
正在生成代码
Previous IPDB not found, fall back to full compilation.
All 4978 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
已完成代码的生成
node_sqlite3.vcxproj -> E:\javet\build\Javet\scripts\node\node_modules\sqlite3\build\Release\node_sqlite3.node
Copying E:\javet\build\Javet\scripts\node\node_modules\sqlite3\build\Release/node_sqlite3.node to ..\lib\binding\napi-v3-win32-x64
已复制 1 个文件。
gyp info ok
The text was updated successfully, but these errors were encountered: