sox-devel@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: "Måns Rullgård" <mans@mansr.com>
To: Jan Stary <hans@stare.cz>
Cc: sox-devel@lists.sourceforge.net
Subject: Re: Build system cleanup
Date: Sun, 23 Aug 2020 18:13:43 +0100	[thread overview]
Message-ID: <yw1xd03hmgjc.fsf@mansr.com> (raw)
In-Reply-To: <20200823140733.GA9403@www.stare.cz> (Jan Stary's message of "Sun, 23 Aug 2020 16:07:33 +0200")

Jan Stary <hans@stare.cz> writes:

>> >> >> C_INCLUDE_PATH=/usr/local/include
>> >> >> LIBRARY_PATH=/usr/local/lib
>> >> >
>> >> > I never used any of these.
>> >> > Are they docummented anywhere?
>> >> 
>> >> Many compilers/linkers support such environment variables.  The gcc
>> >> manual documents them here:
>> >> https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
>> >
>> > I am not using the gcc compiler.
>> > The default OpenBSD/amd64 compiler is clang.
>> 
>> The same settings are used by clang.
>> 
>> >> These are the preferred method for indicating the location of libraries
>> >
>> > Where does this information come from?
>> > ./configure says something else.
>> >
>> > If the above is endeed preferrable (which I doubt),
>> > we have to fix configure to stop recommending
>> > something else than the recommended way.
>> >
>> >> since they augment the compiler's default search path without
>> >> interfering with command-line options which are searched first.
>> >
>> > In the same way, ./configure *FLAGS augment the compiler's path(s)
>> > without "interfering" with the environment
>> > - how is one preferable to the other?
>> 
>> It's simple.  The linker looks for libraries in
>> 
>> 1. -L flags, in order
>> 2. The LIBRARY_PATH environment variable
>> 3. Compiled-in defaults, typically /usr/lib and /lib
>> 
>> It is the responsibility of the system administrator to configure things
>> in such a way that system libraries are found by the system linker.
>
> These are not system libraries.
> These are add-on third party packages such as flac etc.

From the point of view of SoX, there is no difference.  They are
libraries supplied by the system administrator, and it is your job as
such to tell the compiler where to find them.

>> On normal systems, this is achieved by installing add-on libraries
>> somewhere the linker looks by default, such as /usr/lib,
>> or occasionally by setting the relevant variables
>> in the default environment. If OpenBSD chooses to install
>> packages outside the normal search path of
>> the linker, that's really not a SoX problem.
>
> Do I sense the GNU "portability" attitude here?
>
> 	Everything as GNU/Linux does -> we work
> 	Anything else -> fuck them

> It is perfectly OK for a system to install third-party software
> wherever they like, be it /usr/local on OpenBSD (and other *BSDs),
> /opt/local with MacPorts, or /opt/sfw with Solaris.
>
> It is the build system's job, by definition, to accomodate
> these variations, such as header and library paths.
> Which is exactly what the ./configure script is for.
>
> You know that, don't you? But here you go implying that systems
> that install anywhere else but /usr are not "normal".

SoX builds perfectly fine on OpenBSD once you set two environment
variables.  It's not my problem that OpenBSD is designed so as to
require this.

>> How you inform the linker of their location isn't important,
>> but it's your responsibility to do it one way or another.
>
> The way I inform the linker is the way INSTALL and ./configure tells me
> to go, namely, to pass CFLAGS and CPPFLAGS and LDFLASG. That is what:
>
> 1. the INSTALL file explicitly tells the builder to do
>
>   Selection of optional libraries and of other build options
>   can be made by adding parameters to the `./configure' command line
>   Run ./configure --help for a complete list of options.
>   [...]
>   If any libraries are installed in a non-standard locations in your
>   system then you can use the CPPFLAGS and LDFLAGS variables to allow
>   configure to find them. For example:
>
>   ./configure CPPFLAGS="-I/usr/local/multimedia/include" [...]
>
> 2. ./configure --help describes
>
>   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
>               you have headers in a nonstandard directory <include dir>
>
>   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
>               nonstandard directory <lib dir>
>
> 3. has worked for decades
> 4. does not work in the new-build branch

Nothing has changed in how CFLAGS or LDFLAGS are used.

>> If one of the possible methods might in some odd
>> circumstance break something, that's also not a SoX problem.
>
> Doing exactly what INSTALL and ./configure say results in
> a failed build, and you don't consider it a problem?
>
> Repeat after me: having extra headers and libraries
> in /usr/local is not "some odd circumstance".

No, and it works just fine if you supply the correct build environment.

>> The result is in the 'new-build' git branch.
>> I'd appreciate if people, especially on BSD,
>> could give it a try and report any problems.
>
> Well here it is.
>
> And we already know what the problem is:
>
> cc [...] -o .libs/sox sox.o  -L./.libs -lsox -L/usr/local/lib -lpng [...]
> cc [...] -o .libs/sox sox.o  -L/usr/local/lib -L./.libs -lsox -lpng [...]
>
> The first works, the second does not.
> The only difference between the two is the place
> where the extra -L/usr/local/lib gets added,
> as described in the previous emails.

There is no such difference on my OpenBSD system, and there is no reason
why there would be.  The link command in the makefile hasn't changed.

> Please stop pretending it's not a bug.

It builds without problems on a clean OpenBSD install.  If you've
screwed up your system somehow, that's your problem.  It is unreasonable
of you to demand that the SoX build system anticipate and accommodate
every possible misconfiguration.

I have no idea what you've done to your system, but you're barking up
the wrong tree.  I'm done wasting time on this.

-- 
Måns Rullgård


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

  reply	other threads:[~2020-08-23 17:14 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
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 [this message]
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=yw1xd03hmgjc.fsf@mansr.com \
    --to=sox-devel@lists.sourceforge.net \
    --cc=hans@stare.cz \
    /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).