DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 14th October 2008
pormogo pormogo is offline
Port Guard
 
Join Date: Jun 2008
Posts: 10
Default bandwidthd unable to find libpng...

So I've been trying to install bandwidthd on one of my firewalls. I checked and wasn't able to find it in the ports collection so I grabbed the source from source forge. I ran the configure script in the source tree and it told me that it needed libpng but could not find it. So I went into the ports collections and built /usr/ports/graphics/png (I was under the impression whis would build libpng)

the output from pkg_info seems to fit the description for libpng....

png-1.2.18 library for manipulating PNG images

Am I doing something wrong? Below is the output from bandwidthd's configure script.


# ./configure
checking build system type... amd64-unknown-openbsd4.2
checking host system type... amd64-unknown-openbsd4.2
checking for bison... no
checking for byacc... no
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for a BSD compatible install... /usr/bin/install -c
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking how to run the C preprocessor... ./configure[2131]: break: can only break 1 level(s)
gcc -E
checking for X... no
checking for /sw/lib... no
checking for /sw/include... no
checking for /usr/pkg/lib... no
checking for /usr/pkg/include... no
checking for connect in -lsocket... no
checking for gethostbyname in -lnsl... no
checking for inet_aton in -lresolv... no
checking for pow in -lm... yes
checking for libiconv_open in -liconv... yes
checking for png_read_info in -lpng... no
configure: error: Bandwidthd requires but cannot libpng


Thanks for any help that you guys can provide.
Reply With Quote
  #2   (View Single Post)  
Old 14th October 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

Get it from here:
http://download.sourceforge.net/libp...1.2.32.tar.bz2

And install it the old fashion way:
Code:
# ./configure
# make
# make install
To get the list of files that will be installed under default $PREFIX=/usr do that:
Code:
# make install 2>/dev/null | egrep -o "/usr/bin/install.*$" | awk '{print $NF}' | tr -d "'" | tr -d '"'\
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
  #3   (View Single Post)  
Old 14th October 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

The png package does include libpng: here is the packing list:
Code:
@comment $OpenBSD: PLIST,v 1.22 2007/10/06 19:33:28 naddy Exp $
%%SHARED%%
bin/libpng-config
include/libpng/
include/libpng/png.h
include/libpng/pngconf.h
lib/libpng.a
lib/pkgconfig/
lib/pkgconfig/libpng.pc
@endfake
@man man/cat3/libpng.0
@man man/cat3/libpngpf.0
@man man/cat5/png.0
share/doc/png/
share/doc/png/libpng-${VERSION}.txt
You can see exactly what files are installed in your system when you did the pkg_add, just issue $ pkg_info -L png
Reply With Quote
  #4   (View Single Post)  
Old 14th October 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I should point out that is the packing list for -current.

You're on 4.2 -- the version of PNG for 4.2 is 1.2.18. Here's it's packing list:
Code:
@comment $OpenBSD: PLIST,v 1.21 2007/05/16 19:47:00 naddy Exp $
%%SHARED%%
bin/libpng-config
include/libpng/
include/libpng/png.h
include/libpng/pngconf.h
lib/libpng.a
lib/pkgconfig/
lib/pkgconfig/libpng.pc
@endfake
@man man/cat3/libpng.0
@man man/cat3/libpngpf.0
@man man/cat5/png.0
share/doc/png/
share/doc/png/libpng-1.2.18.txt
Reply With Quote
  #5   (View Single Post)  
Old 14th October 2008
pormogo pormogo is offline
Port Guard
 
Join Date: Jun 2008
Posts: 10
Default

Well I went ahead and built libpng from source that I grabbed from sourceforge and that seemd to go over just fine but I still get the same errors when I try and run the configure script for bandiwdthd.

Why would that be happening the specific line that gives issue seems to be

configure: error: Bandwidthd requires but cannot libpng
Reply With Quote
  #6   (View Single Post)  
Old 14th October 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Because whatever it is testing for is failing the test. In order to determine what the test does, you will have to examine the configure script.
Reply With Quote
  #7   (View Single Post)  
Old 14th October 2008
pormogo pormogo is offline
Port Guard
 
Join Date: Jun 2008
Posts: 10
Default

Ahhh well this seems to be the block that is doing it

Code:
# Required Libraries

echo "$as_me:2831: checking for png_read_info in -lpng" >&5
echo $ECHO_N "checking for png_read_info in -lpng... $ECHO_C" >&6
if test "${ac_cv_lib_png_png_read_info+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lpng  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 2839 "configure"
#include "confdefs.h"
Now to find out what that is actually doing.
Reply With Quote
  #8   (View Single Post)  
Old 14th October 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

config.log contains the output of the configure script, including the command used and error message.

I suspect you didn't add /usr/local/ to CFLAGS and/or LDFLAGS, which is why configure can't find libpng.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #9   (View Single Post)  
Old 14th October 2008
pormogo pormogo is offline
Port Guard
 
Join Date: Jun 2008
Posts: 10
Default

Quote:
Originally Posted by Carpetsmoker View Post
I suspect you didn't add /usr/local/ to CFLAGS and/or LDFLAGS, which is why configure can't find libpng.
That sounds a lot like what's happening. Where are CFLAGS/LDFLAGS set? Are these supposed to be enviromental variables or are they stored in the make file? (or is there somewhere else I should be setting them). When I built libpng I thought I remember ld linking /usr/local/lib when I did a make install.
Reply With Quote
Old 15th October 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

This typically works:
# ./configure --prefix=/usr/custom/ CFLAGS="-I/usr/local/include/" LDFLAGS="-L/usr/local/lib/"

I would recommend setting prefix to something other than /usr/ or /usr/local/, so you'll keep your base and package dirs clean ... But that's not a requirment and totally up to you.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Old 21st October 2008
pormogo pormogo is offline
Port Guard
 
Join Date: Jun 2008
Posts: 10
Default

I tried installing it into /opt/local after setting the CFLAGS and LDFLAGS as you showed but it still couldn't seem to find it. I checked the configure log. I noticed that I don't have gd installed. So I went into /usr/ports/graphics/gd and issued a make install. Everything seemed to go well until the following happened.

Code:
gdft.c:113:31: freetype/freetype.h: No such file or directory
gdft.c:114:30: freetype/ftglyph.h: No such file or directory
gdft.c:115:30: freetype/ftsizes.h: No such file or directory
gdft.c:136: error: syntax error before "FT_Library"
gdft.c:145: error: syntax error before "FT_Library"
gdft.c:228: error: syntax error before "library"
gdft.c:228: warning: data definition has no type or storage class
gdft.c: In function `fontFetch':
gdft.c:447: error: syntax error before "err"
gdft.c:458: error: structure has no member named `library'
gdft.c:458: error: structure has no member named `library'
gdft.c:487: error: `err' undeclared (first use in this function)
gdft.c:487: error: (Each undeclared identifier is reported only once
gdft.c:487: error: for each function it appears in.)
gdft.c:487: error: structure has no member named `library'
gdft.c:487: error: structure has no member named `face'
gdft.c:496: error: structure has no member named `face'
gdft.c: In function `fontRelease':
gdft.c:517: error: structure has no member named `face'
gdft.c: At top level:
gdft.c:615: error: syntax error before "FT_Bitmap"
gdft.c: In function `gdft_draw_bitmap':
gdft.c:626: error: `fg' undeclared (first use in this function)
gdft.c:627: error: `im' undeclared (first use in this function)
gdft.c:631: error: `bitmap' undeclared (first use in this function)
gdft.c:635: error: `pen_y' undeclared (first use in this function)
gdft.c:643: error: `ft_pixel_mode_grays' undeclared (first use in this function)
gdft.c:652: error: `ft_pixel_mode_mono' undeclared (first use in this function)
gdft.c:679: error: `pen_x' undeclared (first use in this function)
gdft.c:780: error: `tc_cache' undeclared (first use in this function)
gdft.c: In function `gdImageStringFTEx':
gdft.c:845: error: syntax error before "matrix"
gdft.c:82:1: unterminated #else
*** Error code 1

Stop in /usr/ports/graphics/gd/w-gd-2.0.35/gd-2.0.35.
*** Error code 1

Stop in /usr/ports/graphics/gd/w-gd-2.0.35/gd-2.0.35 (line 690 of Makefile).
*** Error code 1

Stop in /usr/ports/graphics/gd/w-gd-2.0.35/gd-2.0.35 (line 352 of Makefile).
*** Error code 1

Stop in /usr/ports/graphics/gd (line 2063 of /usr/ports/infrastructure/mk/bsd.port.mk).
Does this mean that I need free type installed? I was under the impression that it would build dependencies if needed. I am installing freetype now to see if that fixes this.

EDIT: Nope that didn't seem to help

pkg_info |grep free
freetype-1.3.1p3 free and portable TrueType font rendering engine


freetype is now installed but I am getting the same error when trying to make bandwidthd.

Last edited by pormogo; 21st October 2008 at 06:38 PM.
Reply With Quote
Old 21st October 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by pormogo View Post
...I was under the impression that it would build dependencies if needed....
No. Dependencies are automatically installed only when you are using the ports/packages system.

You are trying to configure and build bandwidthd outside of the ports system.

By the way, history shows a port had been developed, but it apparently never made it into the tree:

http://marc.info/?l=openbsd-ports&w=...bandwidthd&q=b
Reply With Quote
Old 21st October 2008
pormogo pormogo is offline
Port Guard
 
Join Date: Jun 2008
Posts: 10
Default

I was speaking of the gd port. I am getting a stop error when I try and build gd using the ports system. I had thought this was because I had not installed freetype and it was giving an error about not being able to find freetype. I think bandwidthd requires gd in order to interface with libpng.
Reply With Quote
Old 22nd October 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Ah. My mistake, sorry, I thought you were looking for bandwidthd dependencies.

As to your build failure -- a couple of points:
Your ports tree must be in sync with your 4.2 system -- it must be a 4.2 tree. If it isn't, you can get all sorts of problems. I can't tell if it is or not, gd has been at 2.0.35 for a long time. FAQ 15.4.1 describes this synchronicity requirement.

You are always better off installing a package, rather than building the port, if one exists. FAQ 15.4.6 describes the reasons, quite eloquently.
Note that 4.2 will no longer be supported as of November 1.
Reply With Quote
Old 22nd October 2008
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by pormogo View Post
I am getting a stop error when I try and build gd using the ports system.
How did you install the ports tree? Weirdnesses encountered when building may be due to a version mismatch between the version of OpenBSD installed & the tree itself. Section 15.4.1 of the FAQ describes this issue more in detail:

http://openbsd.org/faq/faq15.html#NoFun
Reply With Quote
Old 22nd October 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

You can just install gd and all other dependencies as a package, no need to use ports.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Old 22nd October 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

There's an echo in here.
Reply With Quote
Old 22nd October 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Oh, didn't see that you posted it already ...

But it's a point worth repeating.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to log in delboy FreeBSD Installation and Upgrading 5 31st August 2008 11:39 AM
Unable to hear any sound ebzzry FreeBSD General 26 29th July 2008 06:39 PM
Unable to login squirrelmail satimis Other BSD and UNIX/UNIX-like 3 28th May 2008 04:21 PM
New Accounts Unable to Authenticate cmdba FreeBSD General 4 26th May 2008 01:48 AM
unable to read messages ocicat Feedback and Suggestions 1 3rd May 2008 08:01 AM


All times are GMT. The time now is 02:04 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick