* [Buildroot] Issue Building New Package cmus
@ 2024-05-05 18:41 Dylan via buildroot
2024-05-05 19:33 ` Arnout Vandecappelle via buildroot
0 siblings, 1 reply; 5+ messages in thread
From: Dylan via buildroot @ 2024-05-05 18:41 UTC (permalink / raw)
To: buildroot
[-- Attachment #1: Type: text/plain, Size: 999 bytes --]
Hello,
I have added a new package, cmus, to my buildroot package list, but
when I try to 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:
buildroot/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 to 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
If the mailing list supports it, I have the hash and config files
attached, as well.
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 incorrectly?
Thank you,
Dylan
[-- Attachment #2.1: cmus.hash --]
[-- Type: text/plain, Size: 193 bytes --]
# Locally computed
sha256 ff40068574810a7de3990f4f69c9c47ef49e37bd31d298d372e8bcdafb973fff cmus-2.10.0.tar.gz
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
[-- Attachment #2.2: Config.in --]
[-- Type: text/plain, Size: 186 bytes --]
config BR2_PACKAGE_CMUS
bool "cmus"
select BR2_PACKAGE_NCURSES
help
Small, fast and powerful console music player for
Unix-like operating systems.
https://cmus.github.io/
[-- Attachment #3: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Issue Building New Package cmus
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
0 siblings, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-05-05 19:33 UTC (permalink / raw)
To: Dylan, buildroot
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
> to 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:
> buildroot/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
> to 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
> well.
>
>
> 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
> incorrectly?
>
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Issue Building New Package cmus
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
0 siblings, 1 reply; 5+ messages in thread
From: Dylan via buildroot @ 2024-05-05 22:36 UTC (permalink / raw)
To: Arnout Vandecappelle; +Cc: buildroot
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Issue Building New Package cmus
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
0 siblings, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-05-06 7:01 UTC (permalink / raw)
To: Dylan; +Cc: buildroot
On 06/05/2024 00:36, Dylan wrote:
> 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'
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
> `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
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Issue Building New Package cmus
2024-05-06 7:01 ` Arnout Vandecappelle via buildroot
@ 2024-05-06 23:47 ` Dylan via buildroot
0 siblings, 0 replies; 5+ messages in thread
From: Dylan via buildroot @ 2024-05-06 23:47 UTC (permalink / raw)
To: Arnout Vandecappelle; +Cc: buildroot
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-06 23:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox