-
Notifications
You must be signed in to change notification settings - Fork 70
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
getting stuck while insatlling the mongo_fdw on ubuntu20.04 server #164
Comments
@snadden , Can you please provide us detailed steps you followed to install mongo_fdw on ubuntu. |
Dear Sir,
I was following these steps
Steps for manual installation
<https://github.com/EnterpriseDB/mongo_fdw#mongo-c>mongo-c
<https://github.com/EnterpriseDB/mongo_fdw#meta-driver>meta driver
1. Download and extract source code of mongoc driver for version 1.17.3
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.17.3/mongo-c-driver-1.17.3.tar.gz
tar xzf mongo-c-driver-1.17.3.tar.gz
rm -rf mongo-c-driver
mv mongo-c-driver-1.17.3 mongo-c-driver
cd mongo-c-driver
2. Configure mongoc driver
cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF .
To install at custom location:
cmake -DCMAKE_INSTALL_PREFIX=YOUR_INSTALLATION_DIRECTORY -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF .
3. Compile and install
cmake --build .
cmake --build . --target install
For more details on installation of mongo-c driver, you can refer here<http://mongoc.org/libmongoc/1.17.3/installing.html#configuring-the-build>.
<https://github.com/EnterpriseDB/mongo_fdw#legacy-driver>Legacy driver
Deprecation Notice: The legacy driver support has been deprecated in mongo_fdw 5.4.0 and is expected to be removed entirely in a future release.
* Checkout, extract legacy branch
wget https://github.com/mongodb/mongo-c-driver/archive/v0.8.tar.gz
tar -zxf v0.8.tar.gz
rm -rf mongo-c-driver
mv mongo-c-driver-0.8 mongo-c-driver
<https://github.com/EnterpriseDB/mongo_fdw#json-c>json-c
1. Download and extract source code
wget https://github.com/json-c/json-c/archive/json-c-0.15-20200726.tar.gz
tar -xzf json-c-0.15-20200726.tar.gz
rm -rf json-c
mv json-c-json-c-0.15-20200726/ json-c
cd json-c
2. Configure
cmake .
To install at custom location:
cmake -DCMAKE_INSTALL_PREFIX=YOUR_INSTALLATION_DIRECTORY .
3. Compile and install
make
make install
How to compile against mongo-c Meta or Legacy driver?
To compile against legacy driver, 'Makefile.legacy' must be used and 'Makefile.meta' must be used to compile against the meta driver. For example, this can be achieved by copying required Makefile as shown below: For meta,
cp Makefile.meta Makefile
For legacy (Deprecated in mongo_fdw 5.4.0),
cp Makefile.legacy Makefile
The default compilation is with Meta driver.
<https://github.com/EnterpriseDB/mongo_fdw#mongo_fdw-configuration-compilation-and-installation>Mongo_fdw configuration, compilation and installation
The PKG_CONFIG_PATH environment variable must be set to mongo-c-driver source directory for successful compilation as shown below,
export PKG_CONFIG_PATH=$YOUR_MONGO_FDW_SOURCE_DIR/mongo-c-driver/src/libmongoc/src:$YOUR_MONGO_FDW_SOURCE_DIR/mongo-c-driver/src/libbson/src
The LD_LIBRARY_PATH environment variable must include the path to the mongo-c installation directory containing the libmongoc-1.0.so and libbson-1.0.so files. For example, assuming the installation directory is /home/mongo-c and the libraries were created under it in lib64 sub-directory, then we can define the LD_LIBRARY_PATH as:
export LD_LIBRARY_PATH=/home/mongo-c/lib64:$LD_LIBRARY_PATH
Note: This LD_LIBRARY_PATH environment variable setting must be in effect when the pg_ctl utility is executed to start or restart PostgreSQL or EDB Postgres Advanced Server.
1. To build on POSIX-compliant systems you need to ensure the pg_config executable is in your path when you run make. This executable is typically in your PostgreSQL installation's bin directory. For example:
export PATH=/usr/local/pgsql/bin/:$PATH
2. Compile the code using make.
make USE_PGXS=1
3. Finally install the foreign data wrapper.
make USE_PGXS=1 install
4. Running regression test.
make USE_PGXS=1 installcheck
However, make sure to set the MONGO_HOST, MONGO_PORT, MONGO_USER_NAME, and MONGO_PWD environment variables correctly. The default settings can be found in the mongodb_init.sh script.
Thanks & Regards
Snadden Braganza
IT Dept.
9833498580
[cid:aaa1876f-9a15-49b1-9dac-d177403db8f8]
Disclaimer :The information contained herein(including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Liases Foras Real Estate Rating & Research Pvt. Limited
…________________________________
From: Vaibhav Dalvi ***@***.***>
Sent: Friday, August 26, 2022 10:47 AM
To: EnterpriseDB/mongo_fdw ***@***.***>
Cc: Snadden Braganza ***@***.***>; Mention ***@***.***>
Subject: Re: [EnterpriseDB/mongo_fdw] getting stuck while insatlling the mongo_fdw on ubuntu20.04 server (Issue #164)
@snadden<https://github.com/snadden> , Can you please provide us detailed steps you followed to install mongo_fdw on ubuntu.
—
Reply to this email directly, view it on GitHub<#164 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A2WGAKXIMTIDVC5HVDRCA6DV3BHPJANCNFSM57SSAUUA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Can you please tell us which step is failing out of all above listed? |
Dear Sir,
To build on POSIX-compliant systems you need to ensure the pg_config executable is in your path when you run make. This executable is typically in your PostgreSQL installation's bin directory. For example:
export PATH=/usr/local/pgsql/bin/:$PATH
I have done till this steps
While i run the make step I get an error make n target specified and no target found
Compile the code using make.
make USE_PGXS=1
Thanks & Regards
Snadden Braganza
IT Dept.
9833498580
[cid:5e8b8f73-7603-456f-ba4a-41d1f20f4408]
Disclaimer :The information contained herein(including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Liases Foras Real Estate Rating & Research Pvt. Limited
…________________________________
From: Vaibhav Dalvi ***@***.***>
Sent: Friday, August 26, 2022 12:25 PM
To: EnterpriseDB/mongo_fdw ***@***.***>
Cc: Snadden Braganza ***@***.***>; Mention ***@***.***>
Subject: Re: [EnterpriseDB/mongo_fdw] getting stuck while insatlling the mongo_fdw on ubuntu20.04 server (Issue #164)
Can you please tell us which step is failing out of all above listed?
—
Reply to this email directly, view it on GitHub<#164 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A2WGAKVPQJP4NUDBKGPSOOTV3BS67ANCNFSM57SSAUUA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thanks for response. I think, you haven't downloaded source code of mongo_fdw. Before performing any of the above steps, please download the mongo_fdw source code by using following command:
Then, go to mongo_fdw directory and perform all other steps. |
Dear Sir,
I have download the mongo_fdw folder and ran the below inside that path
make USE_PGXS=1
***@***.***:~/mongo_fdw$ make USE_PGXS=1
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC --std=c99 -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -Ijson-c -DMETA_DRIVER -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o connection.o connection.c
In file included from connection.c:21:
mongo_wrapper.h:27:10: fatal error: json.h: No such file or directory
27 | #include <json.h>
| ^~~~~~~~
compilation terminated.
make: *** [<builtin>: connection.o] Error 1
Thanks & Regards
Snadden Braganza
IT Dept.
9833498580
[cid:f98fd687-344d-485c-aa73-46997e493feb]
Disclaimer :The information contained herein(including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Liases Foras Real Estate Rating & Research Pvt. Limited
…________________________________
From: Vaibhav Dalvi ***@***.***>
Sent: Friday, August 26, 2022 12:38 PM
To: EnterpriseDB/mongo_fdw ***@***.***>
Cc: Snadden Braganza ***@***.***>; Mention ***@***.***>
Subject: Re: [EnterpriseDB/mongo_fdw] getting stuck while insatlling the mongo_fdw on ubuntu20.04 server (Issue #164)
Thanks for response.
I think, you haven't downloaded source code of mongo_fdw. Before performing any of the above steps, please download the mongo_fdw source code by using following command:
git clone https://github.com/EnterpriseDB/mongo_fdw/ .
Then, go to mongo_fdw directory and perform all other steps.
—
Reply to this email directly, view it on GitHub<#164 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A2WGAKS65W5PKZ6XM3FGGDLV3BUQFANCNFSM57SSAUUA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi @snadden Looks like after downloading the mongo_fdw source instantly you're trying to compile the mongo_fdw source code. Then please perform remaining steps i.e. compiling and installing mongo_fdw only after successful execution of autogen.sh. |
I had the same error on Ubuntu 22.4. Installing libmongo-client-dev helped. sudo apt-get install libmongo-client-dev |
While executing this command
snadden@lflinux:/etc/postgresql/12/main$ PATH=/etc/postgresql/12/main:$PATH make
make: *** No targets specified and no makefile found. Stop.
Then I am unable to run the remaining commnads
The text was updated successfully, but these errors were encountered: