From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v12 1/1] squeezelite: new package
Date: Fri, 25 Sep 2015 10:12:58 +0100 [thread overview]
Message-ID: <5605101A.3090102@imgtec.com> (raw)
In-Reply-To: <201509250304.t8P343dO012199@ms-omx03.plus.so-net.ne.jp>
Dear Hiroshi Kawashima,
Peter, Thomas, there is an issue commented below and I think it would be
good to have your opinion on it.
On 09/25/2015 04:04 AM, kei-k at ca2.so-net.ne.jp wrote:
> Dear, Vincente.
>
> Thank you for your test and comment.
>
> Vicente Olivert Riera writes:
>> Dear Hiroshi Kawashima,
>>
>> are you able to download squeezelite? I'm having this problem:
>>
>>>>> squeezelite v1.8 Downloading
>> Doing shallow clone
>> Initialized empty Git repository in
>> /br/output/build/.squeezelite-v1.8.tar.gz.pb3XtQ/squeezelite-v1.8/
>> remote: Counting objects: 82, done.
>> Unpacking objects: 100% (82/82), done.
>> warning: Remote branch v1.8 not found in upstream origin, using HEAD instead
>> fatal: unable to read tree 668edec073bef579bedf43817f65aee3a592d0ef
> Hmm...
> I have been working on my cached source, so I did not realize it.
> Yes, I can reproduce your problem with real clean buildroot tree.
> Maybe something changed https://code.google.com/p/squeezelite repo
> since my last fetch.
> I'm considering to change SQUEEZELITE_SITE to github repo like:
> https://github.com/sixeyed/squeezelite
> Does this repo work for you too ?
the fact that it works or not is not the problem. The problem is that
right now there isn't any official repository for that project, so that
repository could disappear tomorrow. And I don't know if the owner of
that repository has made any change to the source code or not.
Perhaps downloading the tarballs from Google Code and putting them in
mirror.buildroot.org would be the best option. I have added Peter and
Thomas on CC so they can tell their opinion about this issue.
Hiroshi, there is one more little comment below; keep scrolling down.
>>> I think I reflected all feedbacks except TARGET_CONFIGURE_OPTS issue.
>>> I'm not sure the right way to fix this, so would anyone suggest me?
>>
>> TARGET_CONFIGURE_OPTS is a variable which defines PATH, CC, LD and more
>> things. You can have a look at it in package/Makefile.in, line #247.
>>
>> Instead of passing CC="$(TARGET_CC)" LD="$(TARGET_LD) to the make
>> command, you could just pass $(TARGET_CONFIGURE_OPTS).
>>
>> There is a comment at the end where I show you how to use it.
>
> [snip]
>
>>> +define SQUEEZELITE_BUILD_CMDS
>>> + $(TARGET_MAKE_ENV) $(MAKE) OPTS="$(SQUEEZELITE_MAKE_OPTS)" \
>>> + CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all
>>
>> Here is where you could use the $(TARGET_CONFIGURE_OPTS) variable:
>>
>> $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
>> OPTS="$(SQUEEZELITE_MAKE_OPTS)" -C $(@D) all
>>
>> Perhaps using $(TARGET_CONFIGURE_OPTS) as environment variable would
>> work as well, and since it also defines PATH, then $(TARGET_MAKE_ENV)
>> wouldn't be needed:
>>
>> $(TARGET_CONFIGURE_OPTS) $(MAKE) \
>> OPTS="$(SQUEEZELITE_MAKE_OPTS)" -C $(@D) all
> Yes, I know basic usage of TARGET_CONFIGURE_OPTS as you explained,
> thanks.
> But just changing like this does not work with squeezelite's Makefile.
> I included squeezelite's Makefile in last of this e-mail.
> It determines optional libraries to be linked, I choose libsoxr as
> example like this:
> ...
> CFLAGS ?= -Wall -fPIC -O2 $(OPTS)
> LDFLAGS ?= -lasound -lpthread -lm -lrt
> ...
> OPT_RESAMPLE= -DRESAMPLE
> ...
> LINKALL_RESAMPLE = -lsoxr
> ...
> ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS)))
> LDFLAGS += $(LINKALL_RESAMPLE)
> endif
> ...
> $(EXECUTABLE): $(OBJECTS)
> $(CC) $(OBJECTS) $(LDFLAGS) -o $@
> ...
> .c.o:
> $(CC) $(CFLAGS) $(CPPFLAGS) $< -c -o $@
> ...
>
> But TARGET_CONFIGURE_OPTS override CFLAGS, LDFLAGS, etc.
> It results original Makefile logic does not work.
> Can you suggest me right way (of buildroot) how to solve this ?
> How should I control final CFLAGS, LDFLAGS, etc from squeezelite.mk
> file ?
Well, if it doesn't work, then I guess is fine doing it by passing
CC="$(TARGET_CC)" and LD="$(TARGET_LD)" as you already do.
Regards,
Vincent.
> Regards,
> Kawashima
>
> === squeezelite Makefile ====
> # Cross compile support - create a Makefile which defines these three variables and then includes this Makefile...
> CFLAGS ?= -Wall -fPIC -O2 $(OPTS)
> LDFLAGS ?= -lasound -lpthread -lm -lrt
> EXECUTABLE ?= squeezelite
>
> # passing one or more of these in $(OPTS) enables optional feature inclusion
> OPT_DSD = -DDSD
> OPT_FF = -DFFMPEG
> OPT_LINKALL = -DLINKALL
> OPT_RESAMPLE= -DRESAMPLE
> OPT_VIS = -DVISEXPORT
> OPT_IR = -DIR
>
> SOURCES = \
> main.c slimproto.c buffer.c stream.c utils.c \
> output.c output_alsa.c output_pa.c output_stdout.c output_pack.c decode.c \
> flac.c pcm.c mad.c vorbis.c faad.c mpg.c
>
> SOURCES_DSD = dsd.c dop.c dsd2pcm/dsd2pcm.c
> SOURCES_FF = ffmpeg.c
> SOURCES_RESAMPLE = process.c resample.c
> SOURCES_VIS = output_vis.c
> SOURCES_IR = ir.c
>
> LINK_LINUX = -ldl
>
> LINKALL = -lFLAC -lmad -lvorbisfile -lfaad -lmpg123
> LINKALL_FF = -lavcodec -lavformat -lavutil
> LINKALL_RESAMPLE = -lsoxr
> LINKALL_IR = -llirc_client
>
> DEPS = squeezelite.h slimproto.h
>
> UNAME = $(shell uname -s)
>
> # add optional sources
> ifneq (,$(findstring $(OPT_DSD), $(CFLAGS)))
> SOURCES += $(SOURCES_DSD)
> endif
> ifneq (,$(findstring $(OPT_FF), $(CFLAGS)))
> SOURCES += $(SOURCES_FF)
> endif
> ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS)))
> SOURCES += $(SOURCES_RESAMPLE)
> endif
> ifneq (,$(findstring $(OPT_VIS), $(CFLAGS)))
> SOURCES += $(SOURCES_VIS)
> endif
> ifneq (,$(findstring $(OPT_IR), $(CFLAGS)))
> SOURCES += $(SOURCES_IR)
> endif
>
> # add optional link options
> ifneq (,$(findstring $(OPT_LINKALL), $(CFLAGS)))
> LDFLAGS += $(LINKALL)
> ifneq (,$(findstring $(OPT_FF), $(CFLAGS)))
> LDFLAGS += $(LINKALL_FF)
> endif
> ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS)))
> LDFLAGS += $(LINKALL_RESAMPLE)
> endif
> ifneq (,$(findstring $(OPT_IR), $(CFLAGS)))
> LDFLAGS += $(LINKALL_IR)
> endif
> else
> # if not LINKALL and linux add LINK_LINUX
> ifeq ($(UNAME), Linux)
> LDFLAGS += $(LINK_LINUX)
> endif
> endif
>
> OBJECTS = $(SOURCES:.c=.o)
>
> all: $(EXECUTABLE)
>
> $(EXECUTABLE): $(OBJECTS)
> $(CC) $(OBJECTS) $(LDFLAGS) -o $@
>
> $(OBJECTS): $(DEPS)
>
> .c.o:
> $(CC) $(CFLAGS) $(CPPFLAGS) $< -c -o $@
>
> clean:
> rm -f $(OBJECTS) $(EXECUTABLE)
> === end of squeezelite Makefile ====
> ============================================================
> Hiroshi Kawashima
>
next prev parent reply other threads:[~2015-09-25 9:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-24 13:32 [Buildroot] [PATCH v12 1/1] squeezelite: new package kei-k at ca2.so-net.ne.jp
2015-09-24 14:28 ` Vicente Olivert Riera
2015-09-24 14:34 ` Vicente Olivert Riera
2015-09-25 3:04 ` kei-k at ca2.so-net.ne.jp
2015-09-25 9:12 ` Vicente Olivert Riera [this message]
2015-09-25 9:28 ` 川島 浩
2015-09-25 15:07 ` kei
2015-09-25 15:11 ` kei
2015-09-26 11:15 ` 川島 浩
2015-09-25 13:52 ` kei
2015-09-25 14:14 ` Thomas Petazzoni
2015-09-25 14:18 ` Vicente Olivert Riera
2015-09-25 14:22 ` Vicente Olivert Riera
2015-09-25 15:04 ` kei
2015-09-25 15:34 ` kei
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-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5605101A.3090102@imgtec.com \
--to=vincent.riera@imgtec.com \
--cc=buildroot@busybox.net \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox