-
Notifications
You must be signed in to change notification settings - Fork 3
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
error "Loading file /package/text/emacs-27.0.50/share/emacs/27.0.50/lisp/cus-start.elc failed to provide feature 'pg' #8
Comments
make check |
notifications@github.com writes:
make check
emacs --batch -Q -l ert -l test.el -f ert-run-tests-batch-and-exit
Loading file /package/text/emacs-27.0.50/share/emacs/27.0.50/lisp/emacs-lisp/ert.elc failed to provide feature ‘pq’
make: *** [Makefile:28: check] Error 255
It sounds like pq.so cannot be loaded from the directories in load-path.
It should work when you add the directory you built pq.so in to
load-path.
Also, did you compile your emacs with module support? (./configure
--with-modules).
|
As you see, apparently random XX.elc files are blamed to "fail to provide" feature 'pq'. pg_config --includedir make clean make make check I have this file here: |
notifications@github.com writes:
make check
emacs --batch -Q -l ert -l test.el -f ert-run-tests-batch-and-exit
Loading file /package/text/emacs-27.0.50/share/emacs/27.0.50/lisp/emacs-lisp/ert.elc failed to provide feature ‘pq’
make: *** [Makefile:28: check] Error 255
Could you do a basic test without the test harness (ert) by - e.g. -
running the following command?
M-: (load-library "pq") RET
|
On Wed, Jan 03, 2018 at 06:37:48PM +0000, Andreas Seltenreich wrote:
***@***.*** writes:
> make check
> emacs --batch -Q -l ert -l test.el -f ert-run-tests-batch-and-exit
> Loading file /package/text/emacs-27.0.50/share/emacs/27.0.50/lisp/emacs-lisp/ert.elc failed to provide feature ‘pq’
> make: *** [Makefile:28: check] Error 255
Could you do a basic test without the test harness (ert) by - e.g. -
running the following command?
M-: (load-library "pq") RET
That one I get T evaluated.
After that, there is no completion on (pq: C-M-i
Otherwise, for (require 'pq) I get following:
Debugger entered--Lisp error: (error "Loading file /package/text/emacs-27.0.50/share/emacs/27.0.50/lisp/help-mode.elc failed to provide feature ‘pq’")
require(pq)
eval((require 'pq) nil)
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)
|
it appears at random, it changes files: Did you ever try to use development version with your module? |
notifications@github.com writes:
it appears at random, it changes files:
.../emacs/27.0.50/lisp/vc/vc-git.elc failed to provide feature ‘pq’")
Did you ever try to use development version with your module?
I just compiled an emacs from master at
5af5df1f7c20858dab762830e1a94994ceda425b and built emacs-module-postgres
against it. The testbench worked flawlessly:
$ make
gcc -I/home/andreas/src/emacs-module-postgres -I -I/usr/include/postgresql -std=gnu99 -ggdb3 -Wall -fPIC -c pq.c
ld -shared -lpq -o pq.so pq.o
rm pq.o
$ make check
emacs --batch -Q -l ert -l test.el -f ert-run-tests-batch-and-exit
Running 7 tests (2018-01-14 12:18:49+0100)
passed 1/7 pq-encoding-test
passed 2/7 pq-escape-test
passed 3/7 pq-garbage-collect-test
pq: NOTICE: table "ert_nonexisting_table" does not exist, skipping
passed 4/7 pq-notice-receiver-test
passed 5/7 pq-query-test
passed 6/7 pq-reset-connection-test
passed 7/7 pq-signal-error-test
Ran 7 tests, 7 results as expected (2018-01-14 12:18:49+0100)
$ emacs --version
GNU Emacs 27.0.50
Currently, I'm out of ideas how you could get these outlandish symptoms.
|
On Sun, Jan 14, 2018 at 11:25:21AM +0000, Andreas Seltenreich wrote:
***@***.*** writes:
> it appears at random, it changes files:
> .../emacs/27.0.50/lisp/vc/vc-git.elc failed to provide feature ‘pq’")
>
> Did you ever try to use development version with your module?
I just compiled an emacs from master at
5af5df1f7c20858dab762830e1a94994ceda425b and built emacs-module-postgres
against it. The testbench worked flawlessly:
$ make
gcc -I/home/andreas/src/emacs-module-postgres -I -I/usr/include/postgresql -std=gnu99 -ggdb3 -Wall -fPIC -c pq.c
ld -shared -lpq -o pq.so pq.o
rm pq.o
$ make check
emacs --batch -Q -l ert -l test.el -f ert-run-tests-batch-and-exit
Running 7 tests (2018-01-14 12:18:49+0100)
passed 1/7 pq-encoding-test
passed 2/7 pq-escape-test
passed 3/7 pq-garbage-collect-test
pq: NOTICE: table "ert_nonexisting_table" does not exist, skipping
passed 4/7 pq-notice-receiver-test
passed 5/7 pq-query-test
passed 6/7 pq-reset-connection-test
passed 7/7 pq-signal-error-test
Ran 7 tests, 7 results as expected (2018-01-14 12:18:49+0100)
$ emacs --version
GNU Emacs 27.0.50
Currently, I'm out of ideas how you could get these outlandish symptoms.
I have tried it again and get this error:
Debugger entered--Lisp error: (error "Loading file /package/text/emacs-27.0.50/share/emacs/27.0.50/lisp/vc/vc-git.elc failed to provide feature ‘pq’")
require(pq)
eval((require 'pq) nil)
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)
And my pg_config --pkgincludedir is /package/database/postgresql-10.1/include
Does it work with the version 10.1?
Jean
|
notifications@github.com writes:
And my pg_config --pkgincludedir is /package/database/postgresql-10.1/include
Hmm, now that you mention it: This is the option for the server include
directory, not the client one. I pushed a fix for that. It shouldn't
make a difference with your problem though, since your build of pq.so
should have failed if that had mattered.
Does it work with the version 10.1?
Just tried again with both Emacs and postgres bleeding edge. Everything
worked as advertised for me:
,----[ *scratch* ]
| (require 'pq)
| pq
| (setq conn (pq:connectdb "port=54321 dbname=regression user=smith host=/tmp/"))
| #<user-ptr ptr=0x5e8a010 finalizer=0x7f47db939ac6>
| (pq:query conn "select version()")
| ("PostgreSQL 11devel on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18) 6.3.0 20170516, 64-bit")
| emacs-version
| "27.0.50"
`----
regards,
andreas
|
On Sun, Jan 14, 2018 at 06:51:24PM +0000, Andreas Seltenreich wrote:
***@***.*** writes:
> And my pg_config --pkgincludedir is /package/database/postgresql-10.1/include
Hmm, now that you mention it: This is the option for the server include
directory, not the client one. I pushed a fix for that. It shouldn't
make a difference with your problem though, since your build of pq.so
should have failed if that had mattered.
> Does it work with the version 10.1?
Just tried again with both Emacs and postgres bleeding edge. Everything
worked as advertised for me:
,----[ *scratch* ]
| (require 'pq)
| pq
| (setq conn (pq:connectdb "port=54321 dbname=regression user=smith host=/tmp/"))
| #<user-ptr ptr=0x5e8a010 finalizer=0x7f47db939ac6>
| (pq:query conn "select version()")
| ("PostgreSQL 11devel on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18) 6.3.0 20170516, 64-bit")
| emacs-version
| "27.0.50"
`----
regards,
andreas
Thank you for updated. Something must be wrong on
my side, now I get this error.
Debugger entered--Lisp error: (error "Loading file /package/text/emacs-27.0.50/share/emacs/27.0.50/lisp/tabify.elc failed to provide feature ‘pq’")
#<subr require>(pq nil nil)
ad-Advice-require(#<subr require> pq)
apply(ad-Advice-require #<subr require> pq)
require(pq)
eval((require 'pq) nil)
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)
Jean
|
That issue relates to GNU Emacs, and not to emacs-libpq module. So I think it should be closed now as a "bug". I have discussed it as Emacs bug https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30106 and after the patch, few other bugs were found, but I could make it so that it works. Now I can load the emacs-libpq module and have replaced whatever I was doing earlier with pg.el that does not work in the version 10.1 of the PostgreSQL If I find anything weird with your module, I will report again. Otherwise, few commands you made work well. And I found that pq:query is working well even for INSERT statements and anything. I had to adjust to use vectors instead of list members, that was not hard at all. You did not know that pg.el is going to become not functional for 10.1 version of PostgreSQL, and you made this module for your use. As soon as various operating systems start adopting 10.1 version, your module will be more wanted. It advertised on https://www.emacswiki.org/emacs/PostgreSQL#toc2 Thank you for making this happen. |
Hello,
I am trying to load this file test.el however, on (require 'pq) I get the error as in subject of this message. I am using latest GNU Emacs from git.
Please help me run this database connection, as pg.el stopped working with PostgreSQL version 10.1
The text was updated successfully, but these errors were encountered: