aMSN Forums
February 10, 2012, 10:54:09 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: stdc++ not found on openbsd  (Read 19693 times)
qwukian
Newbie

Offline Offline

Posts: 3


View Profile
« on: July 02, 2006, 06:01:34 am »

hi

i'm trying to compile amsn on openbsd, but i have problems with the stdc++ library.

when i execute ./configure

Code:

$ TK_INC_SPEC=/usr/local/include/tk8.4/generic/ ./configure --with-tcl=/usr/local/lib/tcl8.4/ --with-tk=/usr/local/lib/tk8.4
checking for prefix by checking for wish... /usr/local/bin/wish
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking tcl build dir... using tcl library in /usr/local/lib/tcl8.4/
checking tk build dir... using tk library in /usr/local/lib/tk8.4
checking for main in -lstdc++... no
configure: error: stdc++ library not found


config.log

Code:

configure:3016: checking for main in -lstdc++
configure:3040: gcc -o conftest -g -O2   conftest.c -lstdc++   >&5
/usr/lib/libstdc++.so.42.0: undefined reference to `log'
/usr/lib/libstdc++.so.42.0: undefined reference to `sqrt'
/usr/lib/libstdc++.so.42.0: undefined reference to `cosh'
/usr/lib/libstdc++.so.42.0: undefined reference to `finitef'
/usr/lib/libstdc++.so.42.0: undefined reference to `cos'
/usr/lib/libstdc++.so.42.0: undefined reference to `tanh'
/usr/lib/libstdc++.so.42.0: undefined reference to `sin'
/usr/lib/libstdc++.so.42.0: undefined reference to `atan2'
/usr/lib/libstdc++.so.42.0: undefined reference to `pow'
/usr/lib/libstdc++.so.42.0: undefined reference to `sinh'
/usr/lib/libstdc++.so.42.0: undefined reference to `log10'
/usr/lib/libstdc++.so.42.0: undefined reference to `exp'
/usr/lib/libstdc++.so.42.0: undefined reference to `tan'
collect2: ld returned 1 exit status
configure:3046: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #ifdef __cplusplus
| extern "C" void std::exit (int) throw (); using std::exit;
| #endif
| /* end confdefs.h.  */
|
|
| int
| main ()
| {
| main ();
|   ;
|   return 0;
| }
configure:3072: result: no
configure:3077: error: stdc++ library not found


i have the library 'libestdc++.so.6.0 and libestdc++.a in /usr/local/lib/

Can anybody help me please?


pd. my english is bad, sorry  :oops:  (i'm from Chile)
Logged
Phil
Administrator
Super Power User
*****
Offline Offline

Posts: 653


View Profile
« Reply #1 on: July 04, 2006, 12:01:20 pm »

Try run autoconf before running the configure script...
Logged

Phil

AMsn is great, and it will be greater :wink:
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9424


View Profile WWW
« Reply #2 on: July 04, 2006, 05:46:30 pm »

you have libestdc++... shouldn't it be libstdc++ ?
if it's the same thing, try creating symlinks from, libstdc++ to libestdc++
Logged

KaKaRoTo
qwukian
Newbie

Offline Offline

Posts: 3


View Profile
« Reply #3 on: July 07, 2006, 10:56:31 am »

I tried running autoconf 2.57 (env AUTOCONF_VERSION=2.57), but i get the same "configure: error: stdc++ library not found "


i have libstdc++.a and libstdc++.so.42.0 in /usr/lib

i'm bored of using webmessenger

thanks for the help Smiley
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9424


View Profile WWW
« Reply #4 on: July 07, 2006, 03:36:13 pm »

qwukian, did you try looking for the port of amsn for BSD ? Someone did a port and maybe he fixed something for it to work, I know he had to change a few things in the makefile, maybe the configure file too... try that package instead.
Logged

KaKaRoTo
qwukian
Newbie

Offline Offline

Posts: 3


View Profile
« Reply #5 on: July 20, 2006, 07:30:36 am »

ok..

thank you KaKaRoTo.
Logged
Wolverine
Newbie

Offline Offline

Posts: 1


View Profile
« Reply #6 on: August 10, 2006, 08:03:13 pm »

ON ENGLISH:::::::::::::: (ESPAÑOL ABAJO)
Try this:

Code:
$ LDFLAGS="-L/usr/local/lib -lpng12 -Wl,-R/usr/local/lib -Wl,-R/usr/X11R6/lib" CFLAGS="-I/usr/local/include" CPPFLAGS="-I/usr/local/include" ./configure --with-tcl=/usr/local/lib/tcl8.4 --with-tk=/usr/local/lib/tk8.4


This should do the trick.
By the way, I'm using NetBSD, very similar. I do

Code:
$ LDFLAGS="-L/usr/pkg/lib -lpng12 -Wl,-R/usr/pkg/lib -Wl,-R/usr/X11R6/lib" CPPFLAGS="-I/usr/pkg/include" CFLAGS="-I/usr/pkg/include" ./configure --with-tcl=/usr/pkg/lib --with-tk=/usr/pkg/lib


that's not all, however. If you want that *everything* work on the cvs version (Thu Aug 10) as the stable version,
you need to change the Makefile, at the end, from
---->---->
Code:
  ifeq ($(FOUND_OS),linux)
     include $(capture_dir)/Rules.mk
     include $(capture_dir)/libng/Rules.mk
     include $(capture_dir)/libng/plugins/Rules.mk

     ifeq ($(FOUND_X11),yes)
         ADDLIBS    += ${X_LIBS}
         include $(tray_dir)/Rules.mk
         include $(linflash_dir)/Rules.mk
     endif
  endif

---->---->
 for
<----<----
Code:
  ifeq ($(FOUND_OS),linux)
     include $(capture_dir)/Rules.mk
     include $(capture_dir)/libng/Rules.mk
     include $(capture_dir)/libng/plugins/Rules.mk
  endif

     ifeq ($(FOUND_X11),yes)
         ADDLIBS    += ${X_LIBS}
         include $(tray_dir)/Rules.mk
         include $(linflash_dir)/Rules.mk
     endif

<----<----
Also, you want to change the ocurrences of "OnLinux" for "OnUnix" on these files:
Quote
  amsn
   dock.tcl
   trayicon.tcl

and the icon tray will work.

Should I fill a bug report with these changes HuhHuh?

Hope it helps

EN ESPAÑOL::::::::::::::
Proba asi:

Code:
$ LDFLAGS="-L/usr/local/lib -lpng12 -Wl,-R/usr/local/lib -Wl,-R/usr/X11R6/lib" CFLAGS="-I/usr/local/include" CPPFLAGS="-I/usr/local/include" ./configure --with-tcl=/usr/local/lib/tcl8.4 --with-tk=/usr/local/lib/tk8.4

Esto debería hacer que ande.
Yo estoy usando NetBSD, y es muy similar. Hago

Code:
$ LDFLAGS="-L/usr/pkg/lib -lpng12 -Wl,-R/usr/pkg/lib -Wl,-R/usr/X11R6/lib" CPPFLAGS="-I/usr/pkg/include" CFLAGS="-I/usr/pkg/include" ./configure --with-tcl=/usr/pkg/lib --with-tk=/usr/pkg/lib

sin embargo eso no es todo. Si quieres que *todo* ande en la version cvs (Jueves 10 Agosto) como en la estable,
deberás cambiar el Makefile, al final, de
---->---->
Code:
  ifeq ($(FOUND_OS),linux)
     include $(capture_dir)/Rules.mk
     include $(capture_dir)/libng/Rules.mk
     include $(capture_dir)/libng/plugins/Rules.mk

     ifeq ($(FOUND_X11),yes)
         ADDLIBS    += ${X_LIBS}
         include $(tray_dir)/Rules.mk
         include $(linflash_dir)/Rules.mk
     endif
  endif

---->---->
 por esto otro
<----<----
Code:
  ifeq ($(FOUND_OS),linux)
     include $(capture_dir)/Rules.mk
     include $(capture_dir)/libng/Rules.mk
     include $(capture_dir)/libng/plugins/Rules.mk
  endif

     ifeq ($(FOUND_X11),yes)
         ADDLIBS    += ${X_LIBS}
         include $(tray_dir)/Rules.mk
         include $(linflash_dir)/Rules.mk
     endif

<----<----
Tambien deberás cambiar las ocurrencias de "OnLinux" por "OnUnix" en estos archivos:
Quote
  amsn
   dock.tcl
   trayicon.tcl

Y asi funcionará el ícono en la bandeja del sistema.

Debería llenar un bug report con estos cambios HuhHuh?
Espero que te sirva.
Aguante BSD !!!

Wolverine (from Argentina)
Logged
mateus
Newbie

Offline Offline

Posts: 2


View Profile
« Reply #7 on: September 05, 2006, 05:15:19 am »

when i execute the first command
Code:
$ LDFLAGS="-L/usr/local/lib -lpng12 -Wl,-R/usr/local/lib -Wl,-R/usr/X11R6/lib" CFLAGS="-I/usr/local/include" CPPFLAGS="-I/usr/local/include" ./configure --with-tcl=/usr/local/lib/tcl8.4 --with-tk=/usr/local/lib/tk8.4

the system return this information......

Code:

checking for prefix by checking for wish... no
./configure[1465]: tclsh:: not found
expr: syntax error
./configure[1480]: test: 1: unexpected operator/operand
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables


what kind of problem has my compiler??

thanks
Logged
billiob
Administrator
Super Power User
*****
Offline Offline

Posts: 1352


View Profile
« Reply #8 on: September 05, 2006, 11:42:50 am »

First, you have :
Code:
checking for prefix by checking for wish... no
./configure[1465]: tclsh:: not found


Install tcl/tk first.
Logged
mateus
Newbie

Offline Offline

Posts: 2


View Profile
« Reply #9 on: September 05, 2006, 06:02:10 pm »

i have tcl-8.4.7p1 and tk-8.4.7 packages installed...... i try to find tclsh and i have this;
/usr/local/bin/tclsh8.4
/usr/local/bin/eltclsh

is this correct?

thanks
mateus
Logged
JeeBee
Power user
*
Offline Offline

Posts: 139


View Profile
« Reply #10 on: September 05, 2006, 06:58:47 pm »

Try ...

Code:

  --with-tcl=/usr/local/lib --with-tk=/usr/local/lib


... instead of

Code:

  --with-tcl=/usr/local/lib/tcl8.4 --with-tk=/usr/local/lib/tk8.4
Logged
billiob
Administrator
Super Power User
*****
Offline Offline

Posts: 1352


View Profile
« Reply #11 on: September 05, 2006, 08:01:44 pm »

and maybe
Code:
ln -s /usr/local/bin/tclsh /usr/local/bin/eltclsh
Logged
atomik
Newbie

Offline Offline

Posts: 2


View Profile
« Reply #12 on: October 05, 2006, 03:22:23 pm »

I've corrected the stdc++ problem with doing that:

CFLAGS="-I/usr/local/include/libpng -lm" TK_INC_SPEC=/usr/local/include/tk8.4/generic/ ./configure --with-tcl=/usr/local/lib/tcl8.4/ --with-tk=/usr/local/lib/tk8.4  

-lm is for the error with libstdc++ and -I/usr/local/include/libpng to be ok with libpng.

I think that the problem is with the configure script...
It would be nice if you can add something in the configure/MakeFile to be ok with OpenBSD and others.
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9424


View Profile WWW
« Reply #13 on: October 06, 2006, 07:30:57 am »

atomik,
noone has or ever used a BSD system, so we can't make it compatible... but someone did a port of amsn for that platform and you could use that... if you want native support for BSD, then you could always send us a patch (which wouldn't break linux/mac compatibility) and we'll apply it to SVN.
Logged

KaKaRoTo
atomik
Newbie

Offline Offline

Posts: 2


View Profile
« Reply #14 on: November 01, 2006, 01:26:10 pm »

Hi, I've modified the configure script to be ok with openbsd

here the part of the script I modified:

case `uname -s` in
        Linux)
                FOUND_OS="linux"
                ;;
#Modified
        OpenBSD)
                # *BSD has important stuff (from ports)
                # in /usr/local ...
                CFLAGS="$CFLAGS -lm -I/usr/local/include/libpng -I/usr/local/include -L/usr/local/lib"
                LDFLAGS="$LDFLAGS -L/usr/local/lib"
                TK_INC_SPEC=/usr/local/include/tk8.4/generic
                FOUND_OS="bsd"
                ;;

        FreeBSD | NetBSD)
                # *BSD has important stuff (from ports)
                # in /usr/local ...
                CFLAGS="$CFLAGS -I/usr/local/include -L/usr/local/lib"
                LDFLAGS="$LDFLAGS -L/usr/local/lib"
                FOUND_OS="bsd"
                ;;

---------------------------------------------------------------------
Could you include that by default ?


Thanks
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!