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 19th March 2013
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default wbar port - WANTLIBS

I tried wbar in FreeBSD 9.1 but bailed out on FreeBSD after several other long to build ports either failed or segfaulted. I may come back to it once the packages servers are back up.

Anyway, I liked wbar and started trying to make an OpenBSD port. So far, following the Porter's Handbook I have been able to fetch, checksum, extract, and compile with gmake. My next task is to generate the wantlibs. The section on handling shared libaries indicated the importance of an accurate list but does not give much information about how to accomplish the task.
# make lib-depends-check gives:
Code:
Bear# make clean lib-depends-check 
===>  Cleaning for wbar-2.3.4
===>  Checking files for wbar-2.3.4
`/usr/ports/distfiles/wbar-2.3.4.tgz' is up to date.
>> (SHA256) wbar-2.3.4.tgz: OK
===> wbar-2.3.4 depends on: gmake-* -> gmake-3.82p2
===> wbar-2.3.4 depends on: libglade2-* -> libglade2-2.6.4p8v0
===> wbar-2.3.4 depends on: gdk-pixbuf-* -> gdk-pixbuf-2.26.5p1
===> wbar-2.3.4 depends on: imlib2-* -> imlib2-1.4.2p2
===> wbar-2.3.4 depends on: gtk+2-* -> gtk+2-2.24.14p2
===>  Verifying specs: Imlib2>=2 X11 Xrender Xinerama Xi Xrender 
Xcursor Xcomposite Xdamage Xfixes Xext atk-1.0 cairo expat fontconfig
freetype intltool-1 gtk-2.0 libglade-2.0 gio gdk-2.0 gdk-pixbuf-2.0 
gdk-x11-2.0 gtk-x11-2.0 cairo pango-1 atk-1.0 pthread libpng-1.5 harfbuzz 
libXML2 pangoft2-1.0 gobject-2.0 libiconv-1 Imlib2>=2 X11 Xrender 
Xinerama Xi Xrender Xcursor Xcomposite Xdamage Xfixes Xext atk-1.0
cairo expat fontconfig freetype intltool-1 gtk-2.0 libglade-2.0 gio gdk-2.0 
gdk-pixbuf-2.0 gdk-x11-2.0 gtk-x11-2.0 cairo pango-1 atk-1.0 pthread
libpng-1.5 harfbuzz libXML2 pangoft2-1.0 gobject-2.0 libiconv-1
Missing library for intltool-1>=0.0
Missing library for gtk-2.0>=0.0
Missing library for libglade-2.0>=0.0
Missing library for gio>=0.0
Missing library for gdk-2.0>=0.0
Missing library for gdk-pixbuf-2.0>=0.0
Missing library for pango-1>=0.0
Missing library for libpng-1.5>=0.0
Missing library for libXML2>=0.0
Missing library for libiconv-1>=0.0
Fatal error
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2104 '/usr/ports/pobj/wbar-2.3.4/.buildwantlibs')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2413 '/usr/ports/pobj/wbar-2.3.4/.extract_done')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:1823 '/usr/ports/packages/amd64/all/wbar-2.3.4.tgz')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2362 '_internal-package')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2342 'package')
Can't stat /usr/ports/pobj/wbar-2.3.4/fake-amd64: No such file or directory
 at /usr/ports/infrastructure/bin/check-lib-depends line 481
Scanning: ok
Generated by this Makefile
Code:
# $OpenBSD: Makefile.template,v 1.61 2013/03/16 13:41:58 jsh Exp $

COMMENT=                os/x style lightweight application launcher

DISTNAME=               wbar-2.3.4
EXTRACT_SUFX=           .tgz
PKGNAME=                wbar-2.3.4
CATEGORIES=             x11

HOMEPAGE=               http://code.google.com/p/wbar/

MAINTAINER=             ports@openbsd.org

# GPLv2
PERMIT_PACKAGE_CDROM=   Yes
PERMIT_PACKAGE_FTP=     Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP=   Yes

WANTLIB =               Imlib2>=2 X11 Xrender Xinerama Xi Xrender \
                        Xcursor Xcomposite Xdamage Xfixes Xext \
                        atk-1.0 cairo expat fontconfig freetype2 \
                        intltool pkg-config libglade\

# $OpenBSD: Makefile.template,v 1.61 2013/03/16 13:41:58 jsh Exp $
# $OpenBSD: Makefile.template,v 1.61 2013/03/16 13:41:58 jsh Exp $
WANTLIB +=              gtk-x11-2.0 cairo pango-1 atk-1.0 pthread
WANTLIB +=              libpng-1.5 harfbuzz libXML2 pangoft2-1.0
WANTLIB +=              gobject-2.0 libiconv-1

MASTER_SITES =          http://wbar.googlecode.com/files/

EXTRACT_SUFX =          .tgz


LIB_DEPENDS=            devel/libglade2 \
                        graphics/gdk-pixbuf2 \
                        graphics/imlib2 \
                        x11/gtk+2

USE_GMAKE =             Yes
#NO_TEST =              Yes
USE_LIBTOOL =           Yes

CONFIGURE_STYLE =       gnu
#CONFIGURE_SCRIPT =     ??? (if other than configure)
#CONFIGURE_ARGS +=      ${CONFIGURE_SHARED}
#CONFIGURE_ENV =        ???

# for gnu stuff
#AUTOCONF_VERSION =     ??? (defaults to 2.13)
#AUTOMAKE_VERSION =     ??? (defaults to 1.4)
# config.guess and others are copied here
#MODGNU_CONFIG_GUESS_DIRS = ??? (defaults to ${WRKSRC}

#LDFLAGS =              ???
#MAKE_FILE =            ???
#WRKDIST =              ??? if other than ${WRKDIR}/${DISTNAME}
#WRKSRC =               ??? if other than ${WRKDIST}
#WRKBUILD =             ??? if other than ${WRKSRC}
#WRKCONF =              ??? if other than ${WRKBUILD}

#ALL_TARGET =           ???
#INSTALL_TARGET =       ???
#REGRESS_TARGET =       ???

.include <bsd.port.mk>
You can tell I have spent time in the FreeBSD forums - they are very compulsive about BB Codes


My questions:

1) Since this is a new port do I need to list the earliest minor version of the library that will work or can I just start with the version in my current install that I know will successfully compile?

2) The README indicates that wbar just needs X11 and Imlib2 but when I look at other Makefiles, the WANTLIB's list other X11 components like Xcomposite. Some WANTLIB listings have numbers (version-1) or require >= (version1>=1.14) while other do not. Is there a customary place to put minimal versions in the wbar source that I can cross check?

3) Is there a simple way to generate the list?

Thanks in advance

Last edited by shep; 19th March 2013 at 02:23 PM. Reason: correct html link
Reply With Quote
  #2   (View Single Post)  
Old 19th March 2013
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 shep View Post
My next task is to generate the wantlibs. The section on handling shared libaries indicated the importance of an accurate list but does not give much information about how to accomplish the task.
I haven't built a port in several years. From memory, I recall using WANTLIB for libraries in the base or in X, and I recall setting third party libraries as LIB_DEPENDS. I may not remember correctly.
Quote:
1) Since this is a new port do I need to list the earliest minor version of the library that will work or can I just start with the version in my current install that I know will successfully compile?
I would use your -current libraries major.minor as your minimum libspecs, for both WANTLIB and LIB_DEPENDS.
Quote:
3) Is there a simple way to generate the list?
Again, my memory is foggy, but perhaps make with the port-lib-depends-check target?
Reply With Quote
  #3   (View Single Post)  
Old 22nd March 2013
backrow backrow is offline
Real Name: Anthony J. Bentley
Shell Scout
 
Join Date: Jul 2009
Location: Albuquerque, NM
Posts: 136
Default

Quote:
Originally Posted by jggimi View Post
I haven't built a port in several years. From memory, I recall using WANTLIB for libraries in the base or in X, and I recall setting third party libraries as LIB_DEPENDS. I may not remember correctly.
WANTLIB contains libraries from base, X, and packages too. LIB_DEPENDS lists the ports that contain any libraries in WANTLIB that aren’t already in base.
Quote:
Originally Posted by jggimi View Post
Again, my memory is foggy, but perhaps make with the port-lib-depends-check target?
Yes, this is the simplest way.

Quote:
Originally Posted by shep
I think I understand the basic process of compiling a program from source and believe that the porting team uses WANTLIBS, SHARED_LIBS and LIB_DEPENDS entries to assist in port maintenance but I can't find strict definitions and guidelines on how to do this. I think I have everything else (post_install , plists, DESCR) ready to go.
I usually start out with a blank LIB_DEPENDS, or just enough to make it build. Then, run “make port-lib-depends-check”. It will print something like this:
Code:
Missing: crypto.22 (/usr/local/lib/libquvi.so.0.0) (system lib)
Asking ports for dependency libwebp-0.2.1(graphics/libwebp)
Asking ports for dependency gettext-0.18.2p1(devel/gettext)
Asking ports for dependency libiconv-1.14p0(converters/libiconv)
Missing lib: curl.23 (/usr/local/lib/libquvi.so.0.0) (NOT REACHABLE)
Missing lib: idn.17 (/usr/local/lib/libquvi.so.0.0) (NOT REACHABLE)
Missing: m.7 (/usr/local/lib/libquvi.so.0.0) (system lib)
Missing: ssl.19 (/usr/local/lib/libquvi.so.0.0) (system lib)
Missing: z.4 (/usr/local/lib/libquvi.so.0.0) (system lib)
WANTLIB += crypto m ssl z
*** Error 1 in target 'port-lib-depends-check' (ignored)
I look for every lib marked “NOT REACHABLE” and find the port that provides it, and add that to LIB_DEPENDS. (In this case, net/curl and devel/libidn.) Then I run port-lib-depends-check again:
Code:
Missing: crypto.22 (/usr/local/lib/libquvi.so.0.0) (system lib)
Asking ports for dependency curl-7.26.0p1(net/curl)
Asking ports for dependency gettext-0.18.2p1(devel/gettext)
Asking ports for dependency libiconv-1.14p0(converters/libiconv)
Asking ports for dependency libidn-1.26(devel/libidn)
Missing: curl.23 from curl-7.26.0p1 (/usr/local/lib/libquvi.so.0.0)
Missing: idn.17 from libidn-1.26 (/usr/local/lib/libquvi.so.0.0)
Missing: m.7 (/usr/local/lib/libquvi.so.0.0) (system lib)
Missing: ssl.19 (/usr/local/lib/libquvi.so.0.0) (system lib)
Missing: z.4 (/usr/local/lib/libquvi.so.0.0) (system lib)
WANTLIB += crypto curl idn m ssl z
*** Error 1 in target 'port-lib-depends-check' (ignored)
Then I copy and paste the “WANTLIB += crypto …” part into the port Makefile. Running port-lib-depends-check again shows:
Code:
Asking ports for dependency curl-7.26.0p1(net/curl)
Asking ports for dependency gettext-0.18.2p1(devel/gettext)
Asking ports for dependency libiconv-1.14p0(converters/libiconv)
Asking ports for dependency libidn-1.26(devel/libidn)
So everything is okay (no errors).
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems.
Reply With Quote
  #4   (View Single Post)  
Old 23rd March 2013
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

@backrow

Thank you. The OpenBSD porters handbook assumes alot more background than I have.

I jumped in as I learn best by trying to do. In this instance, I had a window open to the handbook and another window actually going through the steps. That worked well until I had annotate the various dependencies in the Makefile.

I also tried looking as recent port commits to see the syntax also the same port in FreeBSD. Needless to say, my port was sloppy. Antoine Jacoutot was nice enough to help and his edits are clean and more concise. I had a busy post-install section that was shuffling some of the files to the standard OpenBSD folders and Antoine just set some build flags. It looks like I need to do more reading and if anyone has any additional recommended reading, beyond the ports handbook, please post them. It would also be a great howto project on how to make a port the OpenBSD way.

I am now trying to test the port on my current machines but my packages are out of synch. I have been running current with binary upgrades and installed the latest ports.tar.gz from snapshots. Unfortunately no new snapshot packages have been built for close to a month. 5.3 is anticipated in about 10 days
Reply With Quote
  #5   (View Single Post)  
Old 23rd March 2013
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by shep View Post
It would also be a great howto project on how to make a port the OpenBSD way.
Better yet, proposing diff(1)'s to the actual Porter's Handbook itself would be more optimal, plus, the project's developers would help maintain/modify the veracity of the information. What the community does not need is more unmaintained incomplete & out-of-date how-to documents floating about the Internet.
Reply With Quote
  #6   (View Single Post)  
Old 19th March 2013
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

I received an email response from Antoine Jacoutot:

Quote:
SHARED_LIBS are versionned shared libraries included in the package.
WANTLIB are libraries that the package depends on.
I think I understand the basic process of compiling a program from source and believe that the porting team uses WANTLIBS, SHARED_LIBS and LIB_DEPENDS entries to assist in port maintenance but I can't find strict definitions and guidelines on how to do this. I think I have everything else (post_install , plists, DESCR) ready to go.

@jggimi
Quote:
I haven't built a port in several years. From memory, I recall using WANTLIB for libraries in the base or in X, and I recall setting third party libraries as LIB_DEPENDS. I may not remember correctly.
Is there a list of what packages are in the baseXX.tgz and the x****XX.tgz?

Last edited by shep; 20th March 2013 at 12:09 AM. Reason: grammer
Reply With Quote
  #7   (View Single Post)  
Old 20th March 2013
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 shep View Post
Is there a list of what packages are in the baseXX.tgz and the x****XX.tgz?
Sure. They're in /usr/lib and /usr/X11R6/lib, respectively.

You can see which libraries -- base, X, and third party -- are required by your executables with ldd(1).
Reply With Quote
  #8   (View Single Post)  
Old 19th March 2013
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

Code:
$ tar tvzf base53.tgz | less
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #9   (View Single Post)  
Old 24th March 2013
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Quote:
Better yet, proposing diff(1)'s to the actual Porter's Handbook itself would be more optimal, plus, the project's developers would help maintain/modify the veracity of the information. What the community does not need is more unmaintained incomplete & out-of-date how-to documents floating about the Internet.
Having a reliable source of information is one of OpenBSD strengths. The Catch-22 is that someone proposing a clarification to the handbook needs to have learned the correct information in order to write it.
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
port fowarding frenchface OpenBSD Security 2 12th October 2010 12:33 PM
SSH on port 443 maxrussell General software and network 4 6th April 2009 05:16 AM
Songbird port maxrussell FreeBSD Ports and Packages 1 2nd March 2009 10:47 AM
Trying to remember port name drhowarddrfine FreeBSD Ports and Packages 4 22nd February 2009 12:19 AM
vlc port failing maxrussell FreeBSD Ports and Packages 11 27th May 2008 04:38 PM


All times are GMT. The time now is 04:37 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