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: Mon, 06 May 2024 19:47:03 -0400 [thread overview]
Message-ID: <FQ83DS.40R820KQ8A6J3@dismail.de> (raw)
In-Reply-To: <c572d16c-4d9b-44db-808d-1aa1e0c61866@mind.be>
Hi Arnout,
I will try that out. I appreciate your assistance!
Thank you,
Dylan
On Mon, May 6 2024 at 09:01:13 AM +0200, Arnout Vandecappelle
<arnout@mind.be> wrote:
>
>
> On 06/05/2024 00:36, Dylan wrote:
>> Hello Arnout,
>>
>> Thank you for the prompt reply. I moved the $(TARGET_CONFIGURE_OPTS)
>> variable \x7fbehind the ./configure and MAKE invocations and it has
>> solved that issue (pasted \x7fbelow).
>>
>> 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 \x7fnames, 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): \x7fundefined reference to `__stack_chk_guard'
>> buildroot/output/host/bin/aarch64-buildroot-linux-gnu-ld:
>> main.c:(.text+0x4c): \x7fundefined reference to `read'
>> buildroot/output/host/bin/aarch64-buildroot-linux-gnu-ld:
>> main.c:(.text+0x64): \x7fundefined reference to `__stack_chk_guard'
>> buildroot/output/host/bin/aarch64-buildroot-linux-gnu-ld:
>> main.c:(.text+0x68): \x7fundefined reference to `__stack_chk_guard'
>> buildroot/output/host/bin/aarch64-buildroot-linux-gnu-ld:
>> main.c:(.text+0x80): \x7fundefined reference to `__stack_chk_fail'
>
> Sounds like the Makefile unconditionally enables stack smashing
> protection, but it's disabled in your Buildroot configuration. Check
> in the Makefile how it's done and then either patch it out, or give
> whatever config option is needed to disable it. If you disable it, it
> will still be enabled by Buildroot when it's enabled in the Buildroot
> configuration (through the CFLAGS that Buildroot passes in).
>
>> buildroot/output/host/bin/aarch64-buildroot-linux-gnu-ld: main.o: in
>> function \x7f`write_line':
>> main.c:(.text+0x138): undefined reference to `strlen'
>
> This is most likely a similar situation but with FORTIFY.
>
> Regards,
> Arnout
>
>>
>> Specifically, right after the line,
>> LD cmus-remote
>>
>> Do you have any suggestions for resources I could dive deeper into
>> this? I've \x7fbeen combing through the buildroot and bootlin docs, but
>> it seems there are some \x7fspecifics 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> \x7fwrote:
>>>
>>>
>>> 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 \x7f\x7f\x7ftry \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:
>>>> \x7f\x7f\x7f\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 \x7f\x7f\x7frelated \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. \x7f\x7fOne of those is CFLAGS, and in the
>>> Makefile itself the definition of VERSION \x7f\x7fis 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 \x7f\x7fthe Makefile properly handles that - e.g. that it uses
>>> += for CFLAGS (which it \x7f\x7fdoes).
>>>
>>> Regards,
>>> Arnout
>>>
>>>>
>>>> If the mailing list supports it, I have the hash and config files
>>>> attached, \x7f\x7f\x7fas \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 \x7f\x7f\x7fdone \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
prev parent reply other threads:[~2024-05-06 23:47 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
2024-05-06 7:01 ` Arnout Vandecappelle via buildroot
2024-05-06 23:47 ` Dylan via buildroot [this message]
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=FQ83DS.40R820KQ8A6J3@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.