sox-devel@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Jan Stary <hans@stare.cz>
To: "Måns Rullgård" <mans@mansr.com>
Cc: sox-devel@lists.sourceforge.net
Subject: Re: Build system cleanup
Date: Fri, 21 Aug 2020 22:17:58 +0200	[thread overview]
Message-ID: <20200821201758.GA23884@www.stare.cz> (raw)
In-Reply-To: <yw1x364fopil.fsf@mansr.com>

On Aug 21 18:52:18, mans@mansr.com wrote:
> Jan Stary <hans@stare.cz> writes:
> 
> > On Aug 21 18:08:27, mans@mansr.com wrote:
> >> Jan Stary <hans@stare.cz> writes:
> >> 
> >> > On Aug 21 17:16:12, hans@stare.cz wrote:
> >> >> > checking for magic.h... no
> >> >> > checking for zlib.h... yes
> >> >> > checking for uncompress in -lz... yes
> >> >> > checking for png.h... no
> >> >> > checking for mad.h... no
> >> >> > checking for id3tag.h... no
> >> >> > checking for lame/lame.h... no
> >> >> > checking for lame.h... no
> >> >> > 
> >> >> > 	$ pkg_info -L lame | grep .h$    
> >> >> > 	/usr/local/include/lame/lame.h
> >> >> > 
> >> >> > 	OpenBSD installs third-party packages into /usr/local/,
> >> >> > 	but the configure script does not look there; it porbably
> >> >> > 	only searches in /usr, because that's where linux distributions
> >> >> > 	install their packages. (I'm not saying it should
> >> >> > 	-- I will test the same with -I added to the CPPFLAGS,
> >> >> > 	as the OpenBSD port of SoX does.)
> >> >> 
> >> >> Running ./configure with CPPFLAGS and LDFLAGS,
> >> >> so that the headers and libraries are found,
> >> >> as per ./configure --help:
> >> >> 
> >> >>   LDFLAGS   linker flags, e.g. -L<lib dir>
> >> >>   	    if you have libraries in a nonstandard directory <lib dir>
> >> >> 
> >> >>   CPPFLAGS  (Objective) C/C++ preprocessor flags, e.g. -I<include dir>
> >> >>             if you have headers in a nonstandard directory <include dir>
> >> >> 
> >> >> I am looking at png as an example.
> >> >> 
> >> >> With plain ./configure , png.h (which is /usr/local/include/png.h)
> >> >> is not found, as described above.
> >> >> 
> >> >>   checking for png.h... no
> >> >> 
> >> >> With ./configure CPPFLAGS='-I/usr/local/include' the png.h header is found,
> >> >> but the library is not, unsurprisingly. But:
> >> >> 
> >> >>   $ ./configure CPPFLAGS='-I/usr/local/include'
> >> >>   [...]
> >> >>   checking for png.h... yes
> >> >>   checking for png_set_rows in -l101... no
> >> >> 
> >> >> I have no idea how the -l101 got there.
> >
> >> Fixed.

OK, continuing with the test. Specifying CPPFLAGS and LDFLAGS
makes the external libraries detected as follows:

$ env AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.16 autoreconf -i
$ ./configure --prefix=$HOME \
	CC=cc CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
[...]
checking for zlib.h... yes
checking for uncompress in -lz... yes
checking for png.h... yes
checking for png_set_rows in -lpng... yes
checking for mad.h... yes
checking for mad_stream_buffer in -lmad... yes
checking for id3tag.h... yes
checking for id3_file_open in -lid3tag... yes
checking for lame/lame.h... yes
checking for lame_init in -lmp3lame... yes
checking for twolame.h... yes
checking for twolame_init in -ltwolame... yes
checking for gsm/gsm.h... no
checking for gsm.h... yes
checking for gsm_create in -lgsm... yes
checking for lpc10.h... no
checking for OGGVORBIS... yes
checking for OPUS... yes
checking for FLAC... yes
checking for opencore-amrwb/dec_if.h... no
checking for vo-amrwbenc/enc_if.h... no
checking for opencore-amrnb/interf_dec.h... no
checking for wavpack/wavpack.h... yes
checking for WavpackGetSampleRate in -lwavpack... yes
checking for sndio.h... yes
checking for sio_open in -lsndio... yes
checking for CoreAudio/CoreAudio.h... no
checking for alsa/asoundlib.h... no
checking for ao/ao.h... yes
checking for ao_play in -lao... yes
checking for pulse/simple.h... no
checking for mmsystem.h... no
checking for sndfile.h... yes
checking for sf_open_virtual in -lsndfile... yes
[...]

Optional libraries:
  id3tag		  yes
  lame			  yes
  libgsm		  yes
  libltdl		  yes
  libsndfile		  yes
  mad			  yes
  magic			  no
  opencore-amrnb	  no
  opencore-amrwb	  no
  png			  yes
  twolame		  yes
  vo-amrwbenc		  no

Audio devices:
  alsa			  no
  ao			  yes
  coreaudio		  no
  oss			  no
  pulseaudio		  no
  sndio			  yes
  sunaudio		  no
  waveaudio		  no

Optional formats:
  amrnb			  no
  amrwb			  no
  flac			  yes
  gsm			  yes
  lpc10			  yes
  mp3			  yes
  oggvorbis		  yes
  opus			  yes
  sndfile		  yes
  wavpack		  yes


However, the build eventually fails with a linking error:


/bin/sh ../libtool  --tag=CC	--mode=link cc	-g -O2 -fstack-protector-strong -Wall -Wmissing-prototypes -Wstrict-prototypes	 -avoid-version -module -L/usr/local/lib -fstack-protector-strong -Wl,--as-needed -o sox sox.o	libsox.la		       -lm
libtool: link: cc -g -O2 -fstack-protector-strong -Wall -Wmissing-prototypes -Wstrict-prototypes -fstack-protector-strong -Wl,--as-needed -o .libs/sox sox.o  -L/usr/local/lib -L./.libs -lsox -lpng -lltdl -lao -lgsm -lid3tag -lz -lmad -lmp3lame -ltwolame -lopusfile -lopus -lsndio -lvorbisfile -lwavpack -lcrypto -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lm -Wl,-rpath,/home/hans/lib -Wl,-rpath,/usr/local/lib
ld: error: undefined symbol: lsx_malloc
[...]

Indeed, none of the input files defines lsx_malloc;
it is defined in libsox.so

	$ nm .libs/libsox.so.3.0 | grep lsx_malloc
	00042a30 T lsx_malloc

but that is not one of the inputs. Adding .libs/libsox.so.3.0
as an input to the above line make it link as expected.

Jan



_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

  parent reply	other threads:[~2020-08-21 20:18 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19 20:40 Build system cleanup Måns Rullgård
2020-08-20 20:40 ` Wolfgang Stoeggl via SoX-devel
2020-08-20 21:22   ` Måns Rullgård
2020-08-20 22:15     ` Wolfgang Stoeggl via SoX-devel
2020-08-21  8:24     ` Jan Stary
2020-08-21  8:16 ` Jan Stary
2020-08-21  8:31   ` Jan Stary
2020-08-21 10:28     ` Måns Rullgård
2020-08-21 12:24       ` Jan Stary
2020-08-21 12:46         ` Måns Rullgård
2020-08-21  8:49   ` Jan Stary
2020-08-21 10:33     ` Måns Rullgård
2020-08-21 12:49       ` Jan Stary
2020-08-21 12:50         ` Jan Stary
2020-08-21 13:32         ` Måns Rullgård
2020-08-21 14:09         ` Jan Stary
2020-08-21 11:15   ` Måns Rullgård
2020-08-21 14:04     ` Jan Stary
2020-08-21 14:47       ` Måns Rullgård
2020-08-21 19:26       ` Wolfgang Stoeggl
2020-08-21 20:20       ` Jan Stary
2020-08-21 15:16   ` Jan Stary
2020-08-21 15:21     ` Jan Stary
2020-08-21 17:08       ` Måns Rullgård
2020-08-21 17:43         ` Jan Stary
2020-08-21 17:52           ` Måns Rullgård
2020-08-21 17:57             ` Jan Stary
2020-08-21 20:17             ` Jan Stary [this message]
2020-08-21 20:45               ` Jan Stary
2020-08-21 21:43                 ` Måns Rullgård
2020-08-22  8:17                   ` Jan Stary
2020-08-22 10:10                     ` Måns Rullgård
2020-08-22 15:35                       ` Jan Stary
2020-08-22 15:44                         ` Jan Stary
2020-08-22 20:54                         ` Måns Rullgård
2020-08-23 14:07                           ` Jan Stary
2020-08-23 17:13                             ` Måns Rullgård
2020-08-23 19:46                               ` Jan Stary
2020-08-24 11:04                                 ` Måns Rullgård
2020-08-24 11:19                                   ` Jan Stary
2020-08-27  9:38                                     ` Jan Stary
2020-08-27 10:53                                       ` Måns Rullgård
2020-08-23 21:55                               ` Jan Stary
2020-08-24  6:56                                 ` Jan Stary
2020-08-27  9:40                                   ` Jan Stary
2020-08-27 11:08                                     ` Måns Rullgård
2020-08-27 11:37                                       ` Jan Stary
2020-08-27 11:53                                         ` Måns Rullgård
2020-08-27 13:05                                     ` Jan Stary
2020-08-27 13:31                                       ` Måns Rullgård
2020-08-27 14:10                                         ` Jan Stary
2020-08-27 14:38                                           ` Jan Stary
2020-08-27 15:11                                         ` Måns Rullgård
2020-08-27 17:41                                           ` Jan Stary
2020-08-27 18:50                                             ` Måns Rullgård
2020-08-27 19:18                                               ` Jan Stary
2020-08-28  4:54                                                 ` Jan Stary
2020-08-28  9:13                                                 ` Måns Rullgård
2020-08-24 12:19                                 ` Måns Rullgård
2020-08-24 14:43                                   ` Jan Stary
2020-08-24 14:59                                     ` Måns Rullgård
2020-08-27  9:44                                       ` Jan Stary
2020-08-27 11:08                                         ` Måns Rullgård
2020-08-24 17:22                                     ` Måns Rullgård
2020-08-22 15:43                     ` Jan Stary
2020-08-22 15:48                       ` Jan Stary
2020-08-24 12:18                   ` Jan Stary
2020-08-24 12:27                     ` Måns Rullgård
2020-08-24 13:16                       ` Jan Stary
2020-08-24 14:15                         ` Måns Rullgård
2020-08-27  9:52                           ` Jan Stary
2020-08-27 11:10                             ` Måns Rullgård
  -- strict thread matches above, loose matches on Subject: below --
2020-08-21  8:52 Jan Stary
2020-08-21 10:36 ` Måns Rullgård
2020-08-21 12:22   ` Jan Stary
2020-08-21 12:27     ` Måns Rullgård
2020-08-27  9:21 Jan Stary
2020-08-27 10:54 ` Jan Stary
2020-08-27 11:52 ` Måns Rullgård
2020-08-27 12:40   ` Jan Stary
2020-08-27 12:44     ` Jan Stary
2020-08-27 12:45     ` Måns Rullgård
2020-08-27 17:45 ` Jan Stary
2020-08-27 18:59   ` Måns Rullgård
2020-08-27 19:51     ` Jan Stary
2020-08-27 20:01 ` Jan Stary
2020-08-28  9:21   ` Måns Rullgård
2020-08-28  9:35     ` Jan Stary
2020-08-28  9:43       ` Måns Rullgård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200821201758.GA23884@www.stare.cz \
    --to=sox-devel@lists.sourceforge.net \
    --cc=mans@mansr.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).