You are not logged in.

#1 2011-04-26 05:06:22

felixonmars
Developer/TU
From: Wuhan, China
Registered: 2011-04-15
Posts: 67
Website

[SOLVED]Yajl 2.0 disabled yaourt

after upgrading to yajl 2.0 today every yaourt operation about package results in:
package-query: error while loading shared libraries: libyajl.so.1: cannot open shared object file: No such file or directory

is there any temporary way to workaround it without downgrading yajl to 1.x?

Last edited by felixonmars (2011-04-26 09:04:39)


PGP key: 30D7CB92
Key fingerprint: B597 1F2C 5C10 A9A0 8C60  030F 786C 63F3 30D7 CB92

Offline

#2 2011-04-26 05:21:10

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [SOLVED]Yajl 2.0 disabled yaourt

Confirmed. For the easier part of it I simply downgraded yajl again.
Most likely package-query (from the AUR here) needs to be recompiled.


To know or not to know ...
... the questions remain forever.

Offline

#3 2011-04-26 05:28:36

nrempel
Member
Registered: 2010-12-27
Posts: 37

Re: [SOLVED]Yajl 2.0 disabled yaourt

I've encountered the same problem.  I fixed it until yaourt is updated by linking /usr/lib/libyajl.so.2 to /usr/lib/libyajl.so.1.

sudo ln /usr/lib/libyajl.so.2 /usr/lib/libyajl.so.1

Offline

#4 2011-04-26 05:29:45

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: [SOLVED]Yajl 2.0 disabled yaourt

symlinking libraries leads to things breaking that are very difficult to diagnose.   Just rebuild the package depending on yajl or downgrade temporarily.

Offline

#5 2011-04-26 05:30:36

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

Re: [SOLVED]Yajl 2.0 disabled yaourt

nrempel wrote:

I've encountered the same problem.  I fixed it until yaourt is updated by linking /usr/lib/libyajl.so.2 to /usr/lib/libyajl.so.1.

sudo ln /usr/lib/libyajl.so.2 /usr/lib/libyajl.so.1

Not a particularly good idea. Nevertheless, doing so here results in:

/usr/lib/yaourt/util.sh: line 165: 17233 Segmentation fault      package-query "${PKGQUERY_C_ARG[@]}" "$@"
Allan wrote:

rebuild the package depending on yajl

Doesn't work.

make  all-recursive
make[1]: Entering directory `/home/chris/src/package-query/package-query/src/package-query-0.7'
Making all in src
make[2]: Entering directory `/home/chris/src/package-query/package-query/src/package-query-0.7/src'
gcc -DLOCALEDIR=\"/usr/share/locale\" -DCONFFILE=\"/etc/pacman.conf\" -DROOTDIR=\"/\" -DDBPATH=\"/var/lib/pacman/\" -DAUR_BASE_URL=\"http://aur.archlinux.org\" -DHAVE_CONFIG_H  -I. -I..     -D_GNU_SOURCE -march=i686 -mtune=generic -O2 -pipe -MT aur.o -MD -MP -MF .deps/aur.Tpo -c -o aur.o aur.c
aur.c: In function ‘aur_json_parse’:
aur.c:427:2: error: unknown type name ‘yajl_parser_config’
aur.c:427:2: warning: excess elements in scalar initializer [enabled by default]
aur.c:427:2: warning: (near initialization for ‘cfg’) [enabled by default]
aur.c:428:2: warning: passing argument 2 of ‘yajl_alloc’ from incompatible pointer type [enabled by default]
/usr/include/yajl/yajl_parse.h:107:26: note: expected ‘struct yajl_alloc_funcs *’ but argument is of type ‘int *’
aur.c:428:2: error: too many arguments to function ‘yajl_alloc’
/usr/include/yajl/yajl_parse.h:107:26: note: declared here
aur.c:430:40: error: ‘yajl_status_insufficient_data’ undeclared (first use in this function)
aur.c:430:40: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [aur.o] Error 1
make[2]: Leaving directory `/home/chris/src/package-query/package-query/src/package-query-0.7/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/chris/src/package-query/package-query/src/package-query-0.7'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

Last edited by neurolysis (2011-04-26 05:47:04)

Offline

#6 2011-04-26 05:32:48

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [SOLVED]Yajl 2.0 disabled yaourt

Caution! Crosslinking libraries is strongly discouraged. Incompatibilities are likely.


To know or not to know ...
... the questions remain forever.

Offline

#7 2011-04-26 05:44:38

nrempel
Member
Registered: 2010-12-27
Posts: 37

Re: [SOLVED]Yajl 2.0 disabled yaourt

Sorry for the bad advice!  Listen to the guy with 8k posts.

Offline

#8 2011-04-26 05:51:10

felixonmars
Developer/TU
From: Wuhan, China
Registered: 2011-04-15
Posts: 67
Website

Re: [SOLVED]Yajl 2.0 disabled yaourt

Allan wrote:

symlinking libraries leads to things breaking that are very difficult to diagnose.   Just rebuild the package depending on yajl or downgrade temporarily.

I tried to rebuild it from source and failed either...
seems yajl doesn't have downward compatibility that much

gcc -DLOCALEDIR=\"/usr/share/locale\" -DCONFFILE=\"/etc/pacman.conf\" -DROOTDIR=\"/\" -DDBPATH=\"/var/lib/pacman/\" -DAUR_BASE_URL=\"http://aur.archlinux.org\" -DHAVE_CONFIG_H  -I. -I..     -D_GNU_SOURCE -march=x86-64 -mtune=generic -O2 -pipe -MT aur.o -MD -MP -MF .deps/aur.Tpo -c -o aur.o aur.c
aur.c:414:5: warning: initialization from incompatible pointer type [enabled by default]
aur.c:414:5: warning: (near initialization for ‘callbacks.yajl_string’) [enabled by default]
aur.c:416:5: warning: initialization from incompatible pointer type [enabled by default]
aur.c:416:5: warning: (near initialization for ‘callbacks.yajl_map_key’) [enabled by default]
aur.c: In function ‘aur_json_parse’:
aur.c:427:2: error: unknown type name ‘yajl_parser_config’
aur.c:427:2: warning: excess elements in scalar initializer [enabled by default]
aur.c:427:2: warning: (near initialization for ‘cfg’) [enabled by default]
aur.c:428:2: warning: passing argument 2 of ‘yajl_alloc’ from incompatible pointer type [enabled by default]
/usr/include/yajl/yajl_parse.h:107:26: note: expected ‘struct yajl_alloc_funcs *’ but argument is of type ‘int *’
aur.c:428:2: error: too many arguments to function ‘yajl_alloc’
/usr/include/yajl/yajl_parse.h:107:26: note: declared here
aur.c:430:40: error: ‘yajl_status_insufficient_data’ undeclared (first use in this function)
aur.c:430:40: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [aur.o] Error 1
make[2]: Leaving directory `/home/felix/Downloads/package-query/src/package-query-0.7/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/felix/Downloads/package-query/src/package-query-0.7'
make: *** [all] Error 2

Last edited by felixonmars (2011-04-26 05:54:32)


PGP key: 30D7CB92
Key fingerprint: B597 1F2C 5C10 A9A0 8C60  030F 786C 63F3 30D7 CB92

Offline

#9 2011-04-26 07:50:56

steve_v
Member
Registered: 2006-02-11
Posts: 80

Re: [SOLVED]Yajl 2.0 disabled yaourt

Offline

#10 2011-04-26 08:01:42

gradetwo
Member
Registered: 2011-04-26
Posts: 1

Re: [SOLVED]Yajl 2.0 disabled yaourt

apply this patch, then rebuild package-query.

--- src/aur.c.old    2011-03-24 07:30:34.000000000 +0800
+++ src/aur.c.new    2011-04-26 15:48:06.445557550 +0800
@@ -424,10 +424,9 @@
     jsonpkg_t pkg_json = { NULL, NULL, "", 0};
     yajl_handle hand;
     yajl_status stat;
-    yajl_parser_config cfg = { 1, 1 };
-    hand = yajl_alloc(&callbacks, &cfg,  NULL, (void *) &pkg_json);
+    hand = yajl_alloc(&callbacks,   NULL, (void *) &pkg_json);
     stat = yajl_parse(hand, (const unsigned char *) s, strlen (s));
-    if (stat != yajl_status_ok && stat != yajl_status_insufficient_data)
+    if (stat != yajl_status_ok) 
     {
         unsigned char * str = yajl_get_error(hand, 1, 
             (const unsigned char *) s, strlen (s));

Offline

#11 2011-04-26 08:04:30

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: [SOLVED]Yajl 2.0 disabled yaourt

I hope you guys fix it in the repos ASAP... great work finding the error and the fix.....

Last edited by Xi0N (2011-04-26 08:06:04)

Offline

#12 2011-04-26 08:04:51

unikum
Member
From: Russia
Registered: 2010-09-04
Posts: 151
Website

Offline

#13 2011-04-26 08:09:26

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED]Yajl 2.0 disabled yaourt

Xi0N wrote:

I hope you guys fix it in the repos ASAP... great work finding the error and the fix.....

FYI yaourt and package-query are not in the repos.

Offline

#14 2011-04-26 08:14:31

felixonmars
Developer/TU
From: Wuhan, China
Registered: 2011-04-15
Posts: 67
Website

Re: [SOLVED]Yajl 2.0 disabled yaourt

tomk wrote:
Xi0N wrote:

I hope you guys fix it in the repos ASAP... great work finding the error and the fix.....

FYI yaourt and package-query are not in the repos.

Yeah I think he meant the archlinuxfr repo.

And, I tried the patch above and succeeded, thank you guys!


PGP key: 30D7CB92
Key fingerprint: B597 1F2C 5C10 A9A0 8C60  030F 786C 63F3 30D7 CB92

Offline

#15 2011-04-26 08:14:50

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: [SOLVED]Yajl 2.0 disabled yaourt

They are in archlinux.fr repos.....

Offline

#16 2011-04-26 08:50:24

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: [SOLVED]Yajl 2.0 disabled yaourt

Just to be clear...   archlinux.fr has nothing to do with anything official Arch Linux.

Offline

#17 2011-04-26 08:50:38

kartagho
Member
Registered: 2011-04-26
Posts: 1

Re: [SOLVED]Yajl 2.0 disabled yaourt

file to downgrade:
http://arm.konnichi.com/2011/04/25/comm … pkg.tar.xz

do  pacman -U yajl-1.0.11-3-i686.pkg.tar.xz

and all ok!

Offline

#18 2011-04-26 08:58:45

sigo
Member
From: belgium
Registered: 2011-03-18
Posts: 15

Re: [SOLVED]Yajl 2.0 disabled yaourt

thanks,
but for the 64bits users, what is the method ?

Offline

#19 2011-04-26 09:06:12

felixonmars
Developer/TU
From: Wuhan, China
Registered: 2011-04-15
Posts: 67
Website

Re: [SOLVED]Yajl 2.0 disabled yaourt

sigo wrote:

thanks,
but for the 64bits users, what is the method ?

I'm a 64-bit user too, and solved it using either of the two ways mentioned above: downgrade yajl to 1.x  or patch package-query and re-compile it.
As for yajl 1.x package, search your /var/cache/pacman/pkg directory and you may find it there.


PGP key: 30D7CB92
Key fingerprint: B597 1F2C 5C10 A9A0 8C60  030F 786C 63F3 30D7 CB92

Offline

#20 2011-04-26 09:07:38

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,924
Website

Re: [SOLVED]Yajl 2.0 disabled yaourt

sigo wrote:

thanks,
but for the 64bits users, what is the method ?

http://arm.konnichi.com/2011/04/25/comm … pkg.tar.xz
pacman -U yajl-1.0.11-3-x86_64.pkg.tar.xz


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#21 2011-04-26 11:02:31

jteixeira
Member
Registered: 2010-11-22
Posts: 3

Re: [SOLVED]Yajl 2.0 disabled yaourt

It's fixed now. Now yaourt require yajl >=2.0.

Offline

#22 2011-04-26 16:24:45

markhadman
Member
Registered: 2010-10-09
Posts: 39

Re: [SOLVED]Yajl 2.0 disabled yaourt

jteixeira wrote:

It's fixed now. Now yaourt require yajl >=2.0.

Huh?

I just rebuilt yaourt from AUR, resync'd yajl and it's still broken:

edit: sorry, I rebuilt package-query from AUR and now it seems fine

Last edited by markhadman (2011-04-26 16:43:09)

Offline

#23 2011-04-27 02:16:16

theringmaster
Member
From: Air Force
Registered: 2007-07-16
Posts: 581
Website

Re: [SOLVED]Yajl 2.0 disabled yaourt

markhadman wrote:
jteixeira wrote:

It's fixed now. Now yaourt require yajl >=2.0.

Huh?

I just rebuilt yaourt from AUR, resync'd yajl and it's still broken:

edit: sorry, I rebuilt package-query from AUR and now it seems fine

+1, just rebuild from the aur package and all is fine.


Check me out on twitter!!! twitter.com/The_Ringmaster

Offline

#24 2011-04-27 22:15:56

aluser
Member
Registered: 2011-01-16
Posts: 119

Re: [SOLVED]Yajl 2.0 disabled yaourt

I have the same problem.. I rebuilt yaourt and package-query from AUR bu I still get the error "problem setting dbpath '/usr/local/var/lib/pacman/' (could not find or read directory)"

Last edited by aluser (2011-04-27 22:16:40)

Offline

#25 2011-04-29 15:50:11

zkeng
Member
Registered: 2009-12-08
Posts: 12

Re: [SOLVED]Yajl 2.0 disabled yaourt

Thank you for the quick fix. Can confirm that it works.

For you felixonmars:

From AUR, download the tarballs for yaourt and package-query and untar them in any directory.
For one package at the time do this:
Fire up a terminal and "cd /path/to/untared/directory"
Then "makepkg"
Last (with root permissions) "pacman -U /path/to/untared/directory/package-name.pkg.tar.xz"

After upgrading the two packages yaourt should work fine again.

Offline

Board footer

Powered by FluxBB