sks-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sks-devel] cybernude.org - sks seg faults under Arch Linux


From: David Benfell
Subject: Re: [Sks-devel] cybernude.org - sks seg faults under Arch Linux
Date: Tue, 10 Jan 2012 21:29:39 -0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Jan 10, 2012 at 05:13:02PM -0800, C.J. Adams-Collier KF7BMP wrote:
> That's unfortunate.  Did you try compiling it in 32-bit mode to see if
> that's what's causing the problem?
> 
> gcc -march i686
> 
I've now tried building sks both in 32-bit mode and in 64-bit mode. Both
fail at the "make all" step.

Figuring out how to make this work at all is, well interesting. Just in
case somebody else wants to try this:

1) in pacman.conf, *two*, repeat TWO, lines needs to be uncommented. I
thought the first of these was a comment, but the second one is just
redundant without it:

[multilib]
Include = /etc/pacman.d/mirrorlist

Then do pacman -Syu.

2) install the multilib version of base-devel:

pacman -S gcc-multilib gcc-libs-multilib binutils-multilib \
libtool-multilib lib32-glibc

Yes, this is safe. Even though you won't believe me. (At least I hope
so. I'm trusting the docs on this.) You need the last of these
(lib32-glibc) even if you aren't doing any compiling.

3a) plan ahead. (Yeah, I know, but this is a bit of a pain.) Anything you
want to build from AUR (like the Berkeley DB) you want to do all at
once. Create ~/.makepkg.conf with the following:

CARCH="i686"
CHOST="i686-pc-linux-gnu"
CFLAGS="-m32 -march=i686 -mtune=generic -O2 -pipe -fstack-protector
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
CXXFLAGS="${CFLAGS}"

Add these lines (sorry about the linewrap) if the file already exists.
When you're done doing these builds, COMMENT THEM BACK OUT or remove the
file.

3b) The PKGBUILD files for the Berkeley DB libraries contain an
incorrect download (source) link. You want:

source=(http://download.oracle.com/berkeley-db/db-${pkgver}.tar.gz)

It comes with:

source=(http://download-uk.oracle.com/berkeley-db/db-${pkgver}.tar.gz)

download-uk.oracle.com no longer seems to exist.

Since both 4.6 and 4.8 seem to be broken (at least under ia64), I tried
to build both. I left the 5.2 version alone because 1) this the current
version under Arch Linux, and 2) per another message I saw on this list,
sks has been tested against it.

3c) Berkeley DB version 4.6 would not successfully build. It produced a
whole lot of messages like:

/usr/bin/ld: i386 architecture of input file `.libs/db185.o' is
incompatible with i386:x86-64 output

I *did* make a second attempt using linux32 (see below). It still
failed.

Berkeley DB version 4.8 *did* successfully build.

3d) Installing i686 packages is a little different, e.g.:

sudo linux32 pacman -U db4.8-4.8.30-1-i686.pkg.tar.xz

The linux32 command apparently fakes a 32-bit architecture so pacman
will comply.

4a) In the sks build directory, change Makefile.local so:

LIBDB=-ldb-4.8

It comes specifying version 4.6. See above.

4b) I've tried building sks both with and without this changing Makefile
so:

CFLAGS=-march i686 -O3 -Werror-implicit-function-declaration
$(CINCLUDES) -I .

Neither succeeds. Both blow up, either complaining the the Berkeley DB
libraries are incompatible or:

atlanta% make dep
ocamldep -pp camlp4o   *.ml *.mli > .depend
atlanta% make all
mkdir -p lib
mkdir -p tmp/bin
mkdir -p tmp/include
touch prepared
cp cryptokit-1.0/cryptokit.cmi cryptokit-1.0/cryptokit.cma \
   cryptokit-1.0/cryptokit.mli lib
cp cryptokit-1.0/libcryptokit.a lib
if test -f cryptokit-1.0/dllcryptokit.so; then \
   cp cryptokit-1.0/dllcryptokit.so lib; fi
if test -f cryptokit-1.0/cryptokit.cmxa; then \
   cp cryptokit-1.0/cryptokit.cmxa cryptokit-1.0/cryptokit.cmx \
   cryptokit-1.0/cryptokit.a lib; fi
gcc -march i686 -O3 -Werror-implicit-function-declaration -I`ocamlc
-where` -I . -c crc.c 
gcc: error: i686: No such file or directory
make: *** [crc.o] Error 1

Finally, I tried treating linux32 as a shell (surprise, it is), running
it, typing "make dep" and "make all" at the prompt. The latter ended
with:

gcc -O3 -Werror-implicit-function-declaration -I`ocamlc -where`
-I/usr/include -L/usr/lib -I . -c bdb_stubs.c 
bdb_stubs.c: In function ‘caml_dbenv_create’:
bdb_stubs.c:268:3: warning: passing argument 2 of ‘dbenv->set_errcall’
from incompatible pointer type [enabled by default]
bdb_stubs.c:268:3: note: expected ‘void (*)(const struct DB_ENV *, const
char *, const char *)’ but argument is of type ‘void (*)(const struct
DB_ENV *, const char *, char *)’
bdb_stubs.c: In function ‘caml_db_create’:
bdb_stubs.c:449:3: warning: passing argument 2 of ‘db->set_errcall’ from
incompatible pointer type [enabled by default]
bdb_stubs.c:449:3: note: expected ‘void (*)(const struct DB_ENV *, const
char *, const char *)’ but argument is of type ‘void (*)(const struct
DB_ENV *, const char *, char *)’
ocamlmklib -custom -o bdb bdb_stubs.o
ocamlmklib -custom -o bdb bdb.cmx -lbdb -ldb-4.8
make[1]: Leaving directory `/home/benfell/sks-1.1.2/bdb'
gcc -march i686 -O3 -Werror-implicit-function-declaration -I`ocamlc
-where` -I . -c crc.c 
gcc: error: i686: No such file or directory
make: *** [crc.o] Error 1

I'm glad I'm on winter break (but not for much longer).


> 
> On Tue, 2012-01-10 at 17:07 -0800, David Benfell wrote:
> > Hi all,
> > 
> > As things stand, it appears that cybernude.org will not be coming back
> > up as an sks server.
> > 
> > I could find no Arch Linux package, either pre-compiled or under AUR for
> > sks. I tried building it against Berkeley database library versions 4.6,
> > 4.8, and 5.2. In all cases, I got a segfault when trying to run it:
> > 
> > Jan  8 21:42:10 (none) kernel: sks[27764]: segfault at 529008 ip
> > 00007f3670d7ac1c sp 00007fffc17a4fa8 error 4 in
> > libc-2.15.so[7f3670c52000+199000]
> > Jan  9 11:55:50 atlanta kernel: sks[4855]: segfault at 529008 ip
> > 00007fb0a800dc1c sp 00007fffb1ed4898 error 4 in
> > libc-2.15.so[7fb0a7ee5000+199000]
> > Jan  9 11:55:50 atlanta kernel: sks[4862]: segfault at 529008 ip
> > 00007fc6f83f5c1c sp 00007fff07e43418 error 4 in
> > libc-2.15.so[7fc6f82cd000+199000]
> > Jan  9 12:16:27 atlanta kernel: sks[5039]: segfault at 529008 ip
> > 00007fdbfd0c4c1c sp 00007fff6d414698 error 4 in
> > libc-2.15.so[7fdbfcf9c000+199000]
> > Jan  9 12:16:42 atlanta kernel: sks[5040]: segfault at 2403 ip
> > 00007f6359931f25 sp 00007fff9b7b7680 error 6 in
> > libdb-4.6.so[7f63598c2000+12c000]
> > Jan  9 13:13:01 atlanta kernel: sks[5651]: segfault at 529008 ip
> > 00007fda90c85c1c sp 00007fffc996e098 error 4 in
> > libc-2.15.so[7fda90b5d000+199000]
> > Jan 10 16:44:12 atlanta kernel: sks[9977]: segfault at 401 ip
> > 00007ff44307bf25 sp 00007fff513467e0 error 6 in
> > libdb-4.6.so[7ff44300c000+12c000]
> > Jan 10 16:49:04 atlanta kernel: sks[10911]: segfault at 529008 ip
> > 00007f55b5300c1c sp 00007fffd29defd8 error 4 in
> > libc-2.15.so[7f55b51d8000+199000]
> > 
> > The error I got at the terminal I was trying to build the database
> > indicated a failure to allocate memory.
> > 
> > I was running from /var/lib/sks, where I've got everything I know to
> > include.
> > 
> > --
> > David Benfell
> > address@hidden
> > _______________________________________________
> > Sks-devel mailing list
> > address@hidden
> > https://lists.nongnu.org/mailman/listinfo/sks-devel
> 


Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]