Subject: Re: vorbis-tools package broken?
To: Jeremy C. Reed <reed@reedmedia.net>
From: SAR <sar@computer.org>
List: netbsd-help
Date: 09/02/2002 19:21:04
On Mon, 2 Sep 2002 12:11:59 -0700 (PDT)
"Jeremy C. Reed" <reed@reedmedia.net> wrote:

> On Sat, 31 Aug 2002, SAR wrote:
> 
> > ===> Registering installation for vorbis-tools-1.0.0.8
> > pkg_create: can't stat `/usr/pkg/bin/ogg123'
> > pkg_create: can't stat `/usr/pkg/man/man1/ogg123.1'
> > pkg_create: can't stat
> > `/usr/pkg/share/doc/vorbis-tools-1.0/ogg123rc-example'
> 
> Look at the Makefile at
> /usr/pkgsrc/audio/vorbis-tools/work/vorbis-tools*/Makefile .
> Does it have a SUBDIRS line that has ogg123?

Yup, ogg123 is included in the SUBDIRS line.  The Makefile in the .../work/vorbis-tools-1.0/ogg123 directory IS being executed during a normal make.
> 
> (I think your other email indicated you didn't have a ogg123
> binary in your ogg123 directory.)

That is correct.  I've watched the Makefile in the ogg123 directory run.

> Anyways, do a make clean from /usr/pkgsrc/audio/vorbis-tools/.
> 
> Then do a "make 2>&1 | tee LOG" and record everything it does
> (if using a Bourne-type shell).  This will log the ./configure
> and make output. Then maybe you can review it to see why it was
> missed.

Done.

YOU DA MAN!  You nudged me in the correct direction.  Here's the summary:

ogg123 was not being built because configure could not find curl/curl.h and libcurl.  But, I had already installed curl!  I verified that curl/curl.h was in /usr/pkg/include, and libcurl was in /usr/pkg/lib, where they belong.  

By digging into the audio/vorbis-tools/work/vorbis-tools-1.0/config.log and creating some links in /usr/include and /usr/lib, I've concluded that the configure script is not looking in /usr/pkg/include and /usr/pkg/lib to find curl.


Below is my rambling log of exactly what I did to track this problem down and work around it.  Now, to find the fix!

-----
I found the following in LOG:

"configure: warning: Prerequisites for ogg123 not met, ogg123 will not be built"

Looking backward in the LOG file from there I found:

"
checking for libcurl... no
*** Could not run libcurl test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means libcurl was incorrectly installed
*** or that you have moved libcurl since it was installed.
configure: warning: libcurl missing
"

I missed these in my earlier tries, 'cause I was working backward from the end of the log.

libcurl is installed as part of curl.  pkg_info showed curl was installed.  I deleted curl and reinstalled it.  At the end of the curl reinstall, I saw a pkg_info error:

"pkg_info: No matching pkg for openssl>=0.9.6g."

So, pkg_delete curl, make install in security/openssl, make reinstall in www/curl, make in audio/vorbis-tools ... still can't find lib curl.

Looking in audio/vorbis-tools/work/vorbis-tools-1.0/config.log I found:

"configure:8061: curl/curl.h: No such file or directory"

But, curl.h is where I expect it to be, as are the libraries:

"
# ls -l /usr/pkg/include/curl/curl.h
-r--r--r--  1 root  wheel  27477 Sep  2 18:09 /usr/pkg/include/curl/curl.h
# ls -l /usr/pkg/lib/*curl*
-rw-r--r--  1 root  wheel  178276 Sep  2 18:09 /usr/pkg/lib/libcurl.a
-rwxr-xr-x  1 root  wheel     742 Sep  2 18:09 /usr/pkg/lib/libcurl.la
lrwxr-xr-x  1 root  wheel      14 Sep  2 18:09 /usr/pkg/lib/libcurl.so -> libcurl.so.2.2
lrwxr-xr-x  1 root  wheel      14 Sep  2 18:09 /usr/pkg/lib/libcurl.so.2 -> libcurl.so.2.2
-rwxr-xr-x  1 root  wheel  147542 Sep  2 18:09 /usr/pkg/lib/libcurl.so.2.2
"

I'm guessing there is an include path problem, so, I created a symlink from /usr/include/curl to /usr/pkg/include/curl.  Failed again.  Looking in config.log I found:

"
configure:8042: checking for libcurl
configure:8072: cc -o conftest -O20 -fsigned-char -I/usr/pkg/include -O2 -O3 -mc
pu=i686 -march=i686 -I/usr/pkg/include -I/usr/pkg/include   -L/usr/pkg/lib  -Wl,
-R/usr/pkg/lib -L/usr/pkg/lib -L/usr/pkg/lib  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib 
conftest.c  -L/usr/pkg/lib -lcurl 1>&5
/usr/bin/ld: cannot open -lcurl: No such file or directory
"

Ah, a different error message.  Progress!  I created symlinks from /usr/lib/libcurl.so to /usr/pkg/lib/libcurl.so.2.2 and from /usr/lib/libcurl.so.2 to /usr/pkg/lib/libcurl.so.2.2.  make install in audio/vorbis-tools finally worked as expected.  ogg123 was installed and is working as expected.
-----

> (I didn't check the latest pkgsrc for it, but I have been using ogg123 for
> over a year. I provided the original pkgsrc for vorbis-tools back in
> March, 2001.)

I had been using ogg123 on an earlier NetBSD 1.5.2 install on the same system I'm having trouble with now.  So, I was completely surprised this install didn't work as expected.

Thank you VERY much for your help.

Have a good one!

SAR
sar@computer.org