All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dylan via buildroot <buildroot@buildroot.org>
To: Arnout Vandecappelle <arnout@mind.be>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] Issue Building New Package cmus
Date: Sun, 05 May 2024 18:36:19 -0400	[thread overview]
Message-ID: <JSA1DS.7U0E3BNQ9NS62@dismail.de> (raw)
In-Reply-To: <c9627c7b-f371-4c6a-8815-5ee3a3c1c190@mind.be>

Hello Arnout,

Thank you for the prompt reply. I moved the $(TARGET_CONFIGURE_OPTS) 
variable behind the ./configure and MAKE invocations and it has solved 
that issue (pasted below).

define CMUS_CONFIGURE_CMDS
 (cd $(@D); \
 $(TARGET_CONFIGURE_OPTS) \
 $(TARGET_CONFIGURE_ARGS) \
 ./configure $(CMUS_CONFIGURE_OPTS))
endef

define CMUS_BUILD_CMDS
 $(TARGET_MAKE_ENV) \
 $(TARGET_CONFIGURE_OPTS) \
 $(TARGET_CONFIGURE_ARGS) \
 $(MAKE) -C $(@D) all
endef

define CMUS_INSTALL_TARGET_CMDS
 $(TARGET_MAKE_ENV) \
 $(TARGET_CONFIGURE_OPTS) \
 $(TARGET_CONFIGURE_ARGS) \
 $(MAKE) -C $(@D) install \
 DESTDIR="$(TARGET_DIR)/usr/bin"
endef


I'm now receiving errors related to "undefined references", which by 
their names, seem rather essential:

main.c:(.text+0x4): undefined reference to `__stack_chk_guard'
buildroot/output/host/bin/aarch64-buildroot-linux-gnu-ld: 
main.c:(.text+0x14): undefined reference to `__stack_chk_guard'
buildroot/output/host/bin/aarch64-buildroot-linux-gnu-ld: 
main.c:(.text+0x4c): undefined reference to `read'
buildroot/output/host/bin/aarch64-buildroot-linux-gnu-ld: 
main.c:(.text+0x64): undefined reference to `__stack_chk_guard'
buildroot/output/host/bin/aarch64-buildroot-linux-gnu-ld: 
main.c:(.text+0x68): undefined reference to `__stack_chk_guard'
buildroot/output/host/bin/aarch64-buildroot-linux-gnu-ld: 
main.c:(.text+0x80): undefined reference to `__stack_chk_fail'
buildroot/output/host/bin/aarch64-buildroot-linux-gnu-ld: main.o: in 
function `write_line':
main.c:(.text+0x138): undefined reference to `strlen'

Specifically, right after the line,
	LD	cmus-remote

Do you have any suggestions for resources I could dive deeper into 
this? I've been combing through the buildroot and bootlin docs, but it 
seems there are some specifics that I am missing.

I have the full build log here, if you're so inclined: 
https://paste.ack.tf/f86eab

Thank you for your assistance!
Dylan

On Sun, May 5 2024 at 09:33:22 PM +0200, Arnout Vandecappelle 
<arnout@mind.be> wrote:
> 
> 
> On 05/05/2024 20:41, Dylan via buildroot wrote:
>> Hello,
>> 
>> I have added a new package, cmus, to my buildroot package list, but 
>> when I try \x7fto compile it during a full rebuild, it returns an error 
>> message,
>> 
>> input.c: In function 'do_http_get':
>> input.c:223:54: error: expected ')' before 'VERSION'
>> CC lib.o
>> make[2]: *** [scripts/lib.mk:66: input.o] Error 1
>> make[2]: *** Waiting for unfinished jobs....
>> make[1]: *** [package/pkg-generic.mk:283: 
>> \x7fbuildroot/output/build/cmus-2.10.0/.stamp_built] Error 2
>> make: *** [Makefile:82: _all] Error 2
>> 
>> 
>> I can build the cmus package outside of buildroot, so I think it may 
>> be related \x7fto my cmus.mk file, but I am not sure what is wrong with 
>> the file.
>> 
>> I've uploaded the contents of the cmus.mk file here:
>> https://paste.ack.tf/8471de
> 
>  You have:
> 
> $(MAKE) $(TARGET_CONFIGURE_OPTS)
> 
>  This forces an override of all variables defined in 
> TARGET_CONFIGURE_OPTS. One of those is CFLAGS, and in the Makefile 
> itself the definition of VERSION is added to CFLAGS.
> 
>  The solution is typically to use
> 
> $(TARGET_CONFIGURE_OPTS) $(MAKE)
> 
> i.e. pass everything in the environment. But then you have to make 
> sure that the Makefile properly handles that - e.g. that it uses += 
> for CFLAGS (which it does).
> 
>  Regards,
>  Arnout
> 
>> 
>> If the mailing list supports it, I have the hash and config files 
>> attached, as \x7fwell.
>> 
>> 
>> I'm using buildroot version 2024.02 and have tried running "make 
>> clean all".
>> Is anyone else able to reproduce the same error, or can tell me what 
>> I've done \x7fincorrectly?
>> 
>> Thank you,
>> Dylan
>> 
>> 
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot


_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-05-05 22:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-05 18:41 [Buildroot] Issue Building New Package cmus Dylan via buildroot
2024-05-05 19:33 ` Arnout Vandecappelle via buildroot
2024-05-05 22:36   ` Dylan via buildroot [this message]
2024-05-06  7:01     ` Arnout Vandecappelle via buildroot
2024-05-06 23:47       ` Dylan via buildroot

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=JSA1DS.7U0E3BNQ9NS62@dismail.de \
    --to=buildroot@buildroot.org \
    --cc=arnout@mind.be \
    --cc=november@dismail.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.