Comments (3)
hello
these should be contained in ms dev include header file
make: Leaving directory '/home/me/dev/js/sql/v8/node_modules/msnodesqlv8/build'
gyp info ok
me@DESKTOP-LCTQPPK:~/dev/js/sql/v8/node_modules/msnodesqlv8$ grep SQLDATETIMEOFFSETN /opt/microsoft/msodbcsql18/include/*.h
#define SQLDATETIMEOFFSETN 0x2b
me@DESKTOP-LCTQPPK:~/dev/js/sql/v8/node_modules/msnodesqlv8$
me@DESKTOP-LCTQPPK:~/dev/js/sql/v8/node_modules/msnodesqlv8$ ls -alrt /opt/microsoft/msodbcsql18/include/*.h
-rw-r--r-- 1 root root 44040 Jan 3 2023 /opt/microsoft/msodbcsql18/include/msodbcsql.h
which on Ubuntu is alongside the library
me@DESKTOP-LCTQPPK:~/dev/js/sql/v8/node_modules/msnodesqlv8$ ls -l /opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.2.so.1.1
-rwxr-xr-x 1 root root 2084624 Jan 3 2023 /opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.2.so.1.1
you may get an idea by looking at one of supplied Docker image files - you likely will also need the odbc dev package
sudo apt-get install -y unixodbc-dev
the locations of where to look are in binding.gyp
it is likely you need to add the location of header files in this file as this is not a supported distribution
see Red Hat section here
have all equialent steps been taken as below on your install
sudo su
#Download appropriate package for the OS version
#Choose only ONE of the following, corresponding to your OS version
#RHEL 7 and Oracle Linux 7
curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo
#RHEL 8 and Oracle Linux 8
curl https://packages.microsoft.com/config/rhel/8/prod.repo > /etc/yum.repos.d/mssql-release.repo
#RHEL 9
curl https://packages.microsoft.com/config/rhel/9.0/prod.repo > /etc/yum.repos.d/mssql-release.repo
exit
sudo yum remove unixODBC-utf16 unixODBC-utf16-devel #to avoid conflicts
sudo ACCEPT_EULA=Y yum install -y msodbcsql18
# optional: for bcp and sqlcmd
sudo ACCEPT_EULA=Y yum install -y mssql-tools18
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc
source ~/.bashrc
# optional: for unixODBC development headers
sudo yum install -y unixODBC-devel
Previous versions
near top of build node-gyp should print the found header filed such as below
ACTION binding_gyp_sqlserverv8_target_print_variables src/BeginTranOperation.cpp
cflags_cpp -std=c++17 | arch: x86_64 | link_path: -L/usr/local/lib -L/usr/local/ssl/lib64/ -L/home/linuxbrew/.linuxbrew/lib/ -L/usr/lib -L. | msodbc_include_folders /opt/microsoft/msodbcsql18/include/ /home/linuxbrew/.linuxbrew/include/ /opt/microsoft/msodbcsql17/include/ /home/linuxbrew/.linuxbrew/include/
these are the found locations you will need the required path to include above to show up here for build to work
note I personally have not ever built the driver on this platform - you may be unlucky even after this and the code fails due to compiler compatibility.
from node-sqlserver-v8.
ah. I'm using libmsodbcsql-17.5.so.2.1
and none of those are defined in the header msodbcsql
.
do you think it's in unixodbc-dev as well?
from node-sqlserver-v8.
I did build a docker image for cento7 which may help as a reference - this does work with driver. I ran into problems with the cpp runtime and eventually pulled gcc 11.2 from src, built that and then built latest node 16 with that compiler before building openssl from src so everything was consistent (else we crash with classic double free SEGV)
this image would likely take hrs to build depending on machine CPU speed but it does produce as we see below a working environment.
apprunner@00ee9bd9dcb4 msnodesqlv8]$ cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
[apprunner@00ee9bd9dcb4 msnodesqlv8]$ gcc --version
gcc (GCC) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[apprunner@00ee9bd9dcb4 msnodesqlv8]$ node --version
v16.20.1
[apprunner@00ee9bd9dcb4 msnodesqlv8]$ node samples/javascript/streaming.js
run with Driver={ODBC Driver 18 for SQL Server}; Server=DESKTOP-VIUCH90;UID=linux; PWD=linux; Database=node;Encrypt=no;
submitted select top 5 * from master..syscolumns elapsed 4 ms
meta = [
{
"size": 128,
"name": "name",
"nullable": true,
"type": "text",
"sqlType": "nvarchar"
},
{
"size": 10,
"name": "id",
"nullable": false,
"type": "number",
"sqlType": "int"
},
from node-sqlserver-v8.
Related Issues (20)
- Module not found: Can't resolve '../build/Release/sqlserverv8' HOT 10
- Module did not self-register: sqlserverv8.node HOT 7
- npm install --save msnodesqlv8 fails MSBuild.exe failed with exit code: 1 HOT 5
- import { SqlClient } from "msnodesqlv8/types"; Cannot find module 'msnodesqlv8/types' or its corresponding type declarations HOT 1
- Unable to initialize msnodesql during Hot Module Reload (HMR) HOT 2
- Security vulnerability detected in latest HOT 1
- uncaughtException: Cannot read properties of null (reading 'query') HOT 3
- `ConcreteColumnType.parseSS` method tampers with plain date strings HOT 3
- Cannot find module '../build/Release/sqlserverv8.node' - Windows 10 / node.js v20.11.0/v21.6.1 HOT 1
- npm install results in LNK1127: library is corrupt HOT 1
- Uncaught Exception: static Sybase = new ServerDialect("Sybase")
- Cannot find module 'msnodesqlv8/types' or its corresponding type declarations. HOT 1
- [Question] What is the authentication detail if set trustedConnection to be true? HOT 2
- Missing binaries for Electron v28 and v29 HOT 6
- Unable to find dialect at msnodesqlv8/lib/sequelize HOT 7
- Execute system stored procedure HOT 3
- Handling of queries that return BIGINT HOT 3
- Segmentation Fault after a few minutes of running .... HOT 1
- Cannot find module 'msnodesqlv8/types' or its corresponding type declarations. HOT 2
- Error When Bulk Inserting Data into a Table with a Column Used as Both Primary and Foreign Key
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-sqlserver-v8.