• Welcome to Valhalla Legends Archive.
 

Linux bncsutil?

Started by brew, February 18, 2008, 02:39 PM

Previous topic - Next topic

K

Quote from: K on February 20, 2008, 10:39 PM
I had modified a version of bncsutil to build on linux a while ago, but the link I posted there no longer works.  I'll have to dig around on my desktop later to see if I still have the source.

Here it is: http://www.fileshost.com/en/file/35048/bncsutil-tar-gz.html

You'll need to install libgmp to build.


Newby

Quote from: K on February 20, 2008, 10:39 PM
I can't really help you resolve it.  I would suggest installing a distribution that requires less fussing in order to get a working gnome/kde/whatever session.

I suggested Ubuntu, but he seems to think it's beneath him.
- Newby

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote<TehUser> Man, I can't get Xorg to work properly.  This sucks.
<torque> you should probably kill yourself
<TehUser> I think I will.  Thanks, torque.

brew

Quote from: Newby on February 21, 2008, 02:58 PM
Quote from: K on February 20, 2008, 10:39 PM
I can't really help you resolve it.  I would suggest installing a distribution that requires less fussing in order to get a working gnome/kde/whatever session.

I suggested Ubuntu, but he seems to think it's beneath him.
Is a gui necessary? I just thought i'd install xorg and gnome for kicks.

@K: Thanks! That's exactly what I needed!
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Explicit

Quote from: brew on February 21, 2008, 04:29 PM
Quote from: Newby on February 21, 2008, 02:58 PM
Quote from: K on February 20, 2008, 10:39 PM
I can't really help you resolve it.  I would suggest installing a distribution that requires less fussing in order to get a working gnome/kde/whatever session.

I suggested Ubuntu, but he seems to think it's beneath him.
Is a gui necessary?

Productivity increases substantially when utilizing an interface as opposed to working within the confines of a terminal.
I'm awake in the infinite cold.

[13:41:45]<@Fapiko> Why is TehUser asking for wang pictures?
[13:42:03]<@TehUser> I wasn't asking for wang pictures, I was looking at them.
[13:47:40]<@TehUser> Mine's fairly short.

Barabajagal

Unless the interface slows down the system...

Explicit

Quote from: Andy on February 22, 2008, 12:09 AM
Unless the interface slows down the system...

It'd be understandable in his case since he's trying to run Gnome.

I prefer a minimalist approach, and then start adding features from there.
I'm awake in the infinite cold.

[13:41:45]<@Fapiko> Why is TehUser asking for wang pictures?
[13:42:03]<@TehUser> I wasn't asking for wang pictures, I was looking at them.
[13:47:40]<@TehUser> Mine's fairly short.

Barabajagal

Ya... I always use the old Windows style interfaces...  Hate themes..

I installed vista on a VM... it took 2 and a half hours to install, and another half hour to get it to where I could use the OS because of the bloated GUI.

brew

@K or someone who knows:
Is this the reason why i needed libgmp?
It wasn't in the package repository, so i just used make. it compiled fine (into libbncsutil.so) and i compiled my program with gcc blah.c -shared libbncsutil.so -o blah. When i try to run it, i get the error "Segmentation Fault". I'm no gcc expert-- anyone have an idea of what i would have to do?
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

iago

Compile it with -g, then run it in gdb:

gdb <programname>
run <parameters>

When it crashes, run "backtrace"

Should tell you what's going on.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


K

If you don't have libgmp installed, it wont compile -- you'll get all sorts of errors about mpz_* not being declared, mpz_t does not name a type, etc.

The problem is that you're linking it wrong.  Try:

gcc whatever.c -lbncsutil -o whatever


The -shared argument is used to create a shared library, not link with one.

brew

Quote from: K on February 22, 2008, 10:57 AM
If you don't have libgmp installed, it wont compile -- you'll get all sorts of errors about mpz_* not being declared, mpz_t does not name a type, etc.

The problem is that you're linking it wrong.  Try:

gcc whatever.c -lbncsutil -o whatever


The -shared argument is used to create a shared library, not link with one.
ah, gotcha.

I tried installing libgmp with pacman, but i dont think that actually did anything.
so i downloaded the source and i'm having trouble compiling it-- no scratch that, running the ./configure script.
Here's the output:

checking build system type... i686-pc-linux-gnuoldld
checking host system type... i686-pc-linux-gnuoldld
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=32
checking compiler gcc -m32 -O2 -fomit-frame-pointer ... no
checking compiler gcc -O2 -fomit-frame-pointer ... no
checking compiler icc -no-gcc ... no
checking whether cc is gcc... yes
checking compiler cc -m32 -O2 -fomit-frame-pointer ... no
checking compiler cc -O2 -fomit-frame-pointer ... no
configure: error: could not find a working compiler, see config.log for details


Here's the config.log:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU MP configure 4.2.2, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  $ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = brewnet
uname -m = i686
uname -r = 2.6.24-ARCH
uname -s = Linux
uname -v = #1 SMP PREEMPT Sun Feb 10 15:21:33 UTC 2008

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = i686
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /bin
PATH: /usr/bin
PATH: /sbin
PATH: /usr/sbin
PATH: /opt/mozilla/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1654: checking build system type
configure:1672: result: i686-pc-linux-gnuoldld
configure:1680: checking host system type
configure:1694: result: i686-pc-linux-gnuoldld
configure:1717: checking for a BSD-compatible install
configure:1772: result: /bin/install -c
configure:1783: checking whether build environment is sane
configure:1826: result: yes
configure:1883: checking for gawk
configure:1899: found /bin/gawk
configure:1909: result: gawk
configure:1919: checking whether make sets $(MAKE)
configure:1939: result: yes
configure:2105: checking whether to enable maintainer-specific portions of Makefiles
configure:2114: result: no
User:
ABI=
CC=
CFLAGS=(unset)
CPPFLAGS=(unset)
MPN_PATH=
GMP:
abilist=32
cclist=gcc icc cc
configure:3794: gcc 2>&1 | grep xlc >/dev/null
configure:3797: $? = 1
configure:3851: checking compiler gcc -m32 -O2 -fomit-frame-pointer
Test compile:
configure:3865: gcc -m32 -O2 -fomit-frame-pointer  conftest.c >&5
collect2: cannot find 'ld'
configure:3868: $? = 1
failed program was:

int main () { return 0; }
configure:4874: result: no
configure:3851: checking compiler gcc -O2 -fomit-frame-pointer
Test compile:
configure:3865: gcc -O2 -fomit-frame-pointer  conftest.c >&5
collect2: cannot find 'ld'
configure:3868: $? = 1
failed program was:

int main () { return 0; }
configure:4874: result: no
configure:3772: icc -c conftest.c >&5
./configure: line 3773: icc: command not found
configure:3775: $? = 127
configure:3794: icc 2>&1 | grep xlc >/dev/null
configure:3797: $? = 1
configure:3851: checking compiler icc -no-gcc
Test compile:
configure:3865: icc -no-gcc  conftest.c >&5
./configure: line 3866: icc: command not found
configure:3868: $? = 127
failed program was:

int main () { return 0; }
configure:4874: result: no
configure:3772: cc -c conftest.c >&5
configure:3775: $? = 0
configure:3778: checking whether cc is gcc
configure:3780: result: yes
configure:3794: cc 2>&1 | grep xlc >/dev/null
configure:3797: $? = 1
configure:3851: checking compiler cc -m32 -O2 -fomit-frame-pointer
Test compile:
configure:3865: cc -m32 -O2 -fomit-frame-pointer  conftest.c >&5
collect2: cannot find 'ld'
configure:3868: $? = 1
failed program was:

int main () { return 0; }
configure:4874: result: no
configure:3851: checking compiler cc -O2 -fomit-frame-pointer
Test compile:
configure:3865: cc -O2 -fomit-frame-pointer  conftest.c >&5
collect2: cannot find 'ld'
configure:3868: $? = 1
failed program was:

int main () { return 0; }
configure:4874: result: no
configure:5112: error: could not find a working compiler, see config.log for details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnuoldld
ac_cv_build_alias=i686-pc-linux-gnuoldld
ac_cv_env_ABI_set=
ac_cv_env_ABI_value=
ac_cv_env_CC_FOR_BUILD_set=
ac_cv_env_CC_FOR_BUILD_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_FOR_BUILD_set=
ac_cv_env_CPP_FOR_BUILD_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_M4_set=
ac_cv_env_M4_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=i686-pc-linux-gnuoldld
ac_cv_host_alias=i686-pc-linux-gnuoldld
ac_cv_path_install='/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_make_make_set=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ABI=''
ACLOCAL='${SHELL} /root/gmp-4.2.2/missing --run aclocal-1.8'
AMTAR='${SHELL} /root/gmp-4.2.2/missing --run tar'
ANSI2KNR=''
AR=''
AS=''
AUTOCONF='${SHELL} /root/gmp-4.2.2/missing --run autoconf'
AUTOHEADER='${SHELL} /root/gmp-4.2.2/missing --run autoheader'
AUTOMAKE='${SHELL} /root/gmp-4.2.2/missing --run automake-1.8'
AWK='gawk'
BITS_PER_MP_LIMB=''
CALLING_CONVENTIONS_OBJS='x86call.lo x86check$U.lo'
CC=''
CCAS=''
CC_FOR_BUILD=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CPP_FOR_BUILD=''
CXX=''
CXXCPP=''
CXXFLAGS=''
CYGPATH_W='echo'
DEFN_LONG_LONG_LIMB=''
DEFS=''
DLLTOOL=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_STATIC_FALSE=''
ENABLE_STATIC_TRUE=''
EXEEXT=''
EXEEXT_FOR_BUILD=''
GMP_LDFLAGS=''
GMP_NAIL_BITS='0'
HAVE_CLOCK_01=''
HAVE_CPUTIME_01=''
HAVE_GETRUSAGE_01=''
HAVE_GETTIMEOFDAY_01=''
HAVE_HOST_CPU_FAMILY_power='0'
HAVE_HOST_CPU_FAMILY_powerpc='0'
HAVE_SIGACTION_01=''
HAVE_SIGALTSTACK_01=''
HAVE_SIGSTACK_01=''
HAVE_STACK_T_01=''
HAVE_SYS_RESOURCE_H_01=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LDFLAGS=''
LEX=''
LEXLIB=''
LEX_OUTPUT_ROOT=''
LIBCURSES=''
LIBGMPXX_LDFLAGS=''
LIBGMP_DLL=''
LIBGMP_LDFLAGS=''
LIBM=''
LIBM_FOR_BUILD=''
LIBOBJS=''
LIBREADLINE=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
M4=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /root/gmp-4.2.2/missing --run makeinfo'
OBJDUMP=''
OBJEXT=''
PACKAGE='gmp'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_NAME='GNU MP'
PACKAGE_STRING='GNU MP 4.2.2'
PACKAGE_TARNAME='gmp'
PACKAGE_VERSION='4.2.2'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
SPEED_CYCLECOUNTER_OBJ='pentium.lo'
STRIP=''
TAL_OBJECT=''
TUNE_SQR_OBJ=''
U=''
U_FOR_BUILD=''
VERSION='4.2.2'
WANT_CXX_FALSE=''
WANT_CXX_TRUE=''
WANT_MPBSD_FALSE=''
WANT_MPBSD_TRUE='#'
WITH_READLINE_01=''
YACC=''
ac_ct_AR=''
ac_ct_AS=''
ac_ct_CC=''
ac_ct_CXX=''
ac_ct_DLLTOOL=''
ac_ct_OBJDUMP=''
ac_ct_RANLIB=''
ac_ct_STRIP=''
am__leading_dot='.'
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnuoldld'
build_alias=''
build_cpu='i686'
build_os='linux-gnuoldld'
build_vendor='pc'
datadir='${prefix}/share'
exec_prefix='NONE'
gmp_srclinks=''
host='i686-pc-linux-gnuoldld'
host_alias=''
host_cpu='i686'
host_os='linux-gnuoldld'
host_vendor='pc'
includedir='${prefix}/include'
infodir='${prefix}/info'
install_sh='/root/gmp-4.2.2/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
mkdir_p='mkdir -p -- .'
mpn_objects=''
mpn_objs_in_libgmp=''
mpn_objs_in_libmp=''
oldincludedir='/usr/include'
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define HAVE_HOST_CPU_i686 1
#define PACKAGE "gmp"
#define PACKAGE_BUGREPORT "[email protected]"
#define PACKAGE_NAME "GNU MP"
#define PACKAGE_STRING "GNU MP 4.2.2"
#define PACKAGE_TARNAME "gmp"
#define PACKAGE_VERSION "4.2.2"
#define VERSION "4.2.2"
#define WANT_FFT 1

configure: exit 1
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

K

Quote
configure:3865: gcc -O2 -fomit-frame-pointer  conftest.c >&5
collect2: cannot find 'ld'

This is the problem.  It's looking for the linker 'ld' yet you have no 'ld'.  I'm pretty sure you should have an 'ld' if you have a 'gcc'.  Honestly, install a different distribution.  These are some weird issues you're running into, and it would be much easier to get a friendlier distro than troubleshoot this stuff.

brew

arrg! in that case, how would i get ld? it's not in the packages...
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Kp

You didn't install the assembler/linker.  You need to install the binary utilities if you expect to link anything.

Also, it looks like you logged in as root.  Don't do that.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

brew

#29
Heh. All i needed to do is reinstall binutils, and look at that. i have ld. so i did ./configure, got a bit farther than i did last time, but it errors again. i was missing m4. Fortunately it was easier to find and install then i expected.. so after 10-12 minutes of verbose output, compiling and linking it finally compiled. Wow! So now with libgmp compiled, i went back to compile bncsutil. It came out just fine. I then mv'd it to /usr/bin/ld. Then... when i go back to compile my project (gcc blah.c -lbncsutil -o blah) it gives me the error "collect2: ld terminated with signal 11 [Segmentation fault]". Googling was no help at all, I couldn't find what i was looking for. Help? I'm somewhat lost. All that hard work got me was having ld segfault on linking instead of segfaulting on runtime.

EDIT ** When i tried to do ld -version it gave me a segfault. it's the damn linker itself. WHY?
iago was right. gdb tiem nao ^^;;


bash-3.2# gdb ld
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run -version
Starting program: /usr/bin/ld -version
(no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.
0x80003316 in __do_global_dtors_aux ()
(gdb) backtrace
#0  0x80003316 in __do_global_dtors_aux ()
#1  0x00000002 in ?? ()


It doesn't tell me much. All that I know now is that two addresses aren't what they're supposed to be.

EDIT 2 ***
Oh wow, I pacman -Sy binutils again and it all of a sudden works...? when I get this problem it appears as if the only solution is to reinstall it. Why does it have to be so screwy?
Not only that, but i still get an error. It can't find -lbncsutil, what now?
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

|