All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Buildroot | ninja build error | /usr/bin/ld:error adding symbols: file in wrong format
@ 2022-03-31 17:55 Sourabh Hegde
  2022-04-01  9:10 ` Sourabh Hegde
  2022-04-01  9:11 ` Quentin Schulz
  0 siblings, 2 replies; 11+ messages in thread
From: Sourabh Hegde @ 2022-03-31 17:55 UTC (permalink / raw)
  To: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 6152 bytes --]

Hello All,

While building casync using ninja build I am facing below errors
related to /usr/bin/ld:
. . .error adding symbols: file in wrong format

I am following "casync" build guideline from
https://github.com/systemd/casync#building-casync
<https://github.com/ninja-build/ninja/issues/url> , it uses "meson " along
with ninja build.

If build failures persist, run "meson setup --wipe" to rebuild from scratch
using the same options as passed when configuring the build.
To change option values, run "meson configure" instead.
ninja: Entering directory build'
[1/31] Linking target casync-http
FAILED: casync-http
cc -o casync-http casync-http.p/src_casync-http.c.o -Wl,--as-needed
-Wl,--no-undefined
-Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
-Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
-Wl,--start-group src/libshared.a
/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcurl.so

/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so

/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so

/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so

/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
 /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
-lm -Wl,--end-group
/usr/bin/ld:
/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcurl.so:
error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
[2/31] Linking target test-cachunk
FAILED: test-cachunk
cc -o test-cachunk test-cachunk.p/test_test-cachunk.c.o -Wl,--as-needed
-Wl,--no-undefined
-Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
-Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
-Wl,--start-group src/libshared.a -lacl
/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so

/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libselinux.so

/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
 /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
-lm
/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so
 /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so
-Wl,--end-group -pthread
/usr/bin/ld:
/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so:
error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
[3/31] Linking target test-cachunker
FAILED: test-cachunker
cc -o test-cachunker test-cachunker.p/test_test-cachunker.c.o
-Wl,--as-needed -Wl,--no-undefined
-Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
-Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
-Wl,--start-group src/libshared.a -lacl
/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so

/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libselinux.so

/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
 /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
-lm
/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so
 /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so
-Wl,--end-group -pthread
/usr/bin/ld:
/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so:
error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
[4/31] Linking target test-caencoder
FAILED: test-caencoder
cc -o test-caencoder test-caencoder.p/test_test-caencoder.c.o
-Wl,--as-needed -Wl,--no-undefined
-Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
-Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
-Wl,--start-group src/libshared.a -lacl
/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so

/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libselinux.so

/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
 /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
-lm
/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so
 /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so
-Wl,--end-group -pthread
/usr/bin/ld:
/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so:
error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
.
.
[10/31] Compiling C object test-camatch.p/test_test-camatch.c.o
ninja: build stopped: subcommand failed.

I am using Buildroot as build system and after following similar post in
https://stackoverflow.com/questions/27967802/libstdc-so-error-adding-symbols-file-in-wrong-format
<https://github.com/ninja-build/ninja/issues/url> I changed the PATH
environment
like:

/root/raspcm4/sources/output/host/bin/:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/raspcm4/sources/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/bin

But still, I end up getting the same errors

Can anyone please let me know how to resolve this issue? Is there any ninja
build option to be selected in Buildroot?

Your help will be much appreciated.

Thanks in advance

P.S: Please let me know if any info is missing here

[-- Attachment #1.2: Type: text/html, Size: 25982 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] Buildroot | ninja build error | /usr/bin/ld:error adding symbols: file in wrong format
  2022-03-31 17:55 [Buildroot] Buildroot | ninja build error | /usr/bin/ld:error adding symbols: file in wrong format Sourabh Hegde
@ 2022-04-01  9:10 ` Sourabh Hegde
  2022-04-01  9:11 ` Quentin Schulz
  1 sibling, 0 replies; 11+ messages in thread
From: Sourabh Hegde @ 2022-04-01  9:10 UTC (permalink / raw)
  To: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 6532 bytes --]

Hello,

Any update on below request would be appreciated.

Thanks in advance,
Sourabh

On Thu, Mar 31, 2022, 19:55 Sourabh Hegde <hrsourabh011@gmail.com> wrote:

> Hello All,
>
> While building casync using ninja build I am facing below errors related
> to /usr/bin/ld: . . .error adding symbols: file in wrong format
>
> I am following "casync" build guideline from
> https://github.com/systemd/casync#building-casync
> <https://github.com/ninja-build/ninja/issues/url> , it uses "meson " along
> with ninja build.
>
> If build failures persist, run "meson setup --wipe" to rebuild from scratch
> using the same options as passed when configuring the build.
> To change option values, run "meson configure" instead.
> ninja: Entering directory build'
> [1/31] Linking target casync-http
> FAILED: casync-http
> cc -o casync-http casync-http.p/src_casync-http.c.o -Wl,--as-needed
> -Wl,--no-undefined -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,--start-group src/libshared.a
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcurl.so
>
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so
>
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so
>
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so
>
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
>  /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
> -lm -Wl,--end-group
> /usr/bin/ld:
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcurl.so:
> error adding symbols: file in wrong format
> collect2: error: ld returned 1 exit status
> [2/31] Linking target test-cachunk
> FAILED: test-cachunk
> cc -o test-cachunk test-cachunk.p/test_test-cachunk.c.o -Wl,--as-needed
> -Wl,--no-undefined -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,--start-group src/libshared.a -lacl
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so
>
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libselinux.so
>
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
>  /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
> -lm
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so
>  /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so
> -Wl,--end-group -pthread
> /usr/bin/ld:
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so:
> error adding symbols: file in wrong format
> collect2: error: ld returned 1 exit status
> [3/31] Linking target test-cachunker
> FAILED: test-cachunker
> cc -o test-cachunker test-cachunker.p/test_test-cachunker.c.o
> -Wl,--as-needed -Wl,--no-undefined -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,--start-group src/libshared.a -lacl
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so
>
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libselinux.so
>
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
>  /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
> -lm
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so
>  /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so
> -Wl,--end-group -pthread
> /usr/bin/ld:
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so:
> error adding symbols: file in wrong format
> collect2: error: ld returned 1 exit status
> [4/31] Linking target test-caencoder
> FAILED: test-caencoder
> cc -o test-caencoder test-caencoder.p/test_test-caencoder.c.o
> -Wl,--as-needed -Wl,--no-undefined -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,--start-group src/libshared.a -lacl
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so
>
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libselinux.so
>
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
>  /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
> -lm
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so
>  /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so
> -Wl,--end-group -pthread
> /usr/bin/ld:
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so:
> error adding symbols: file in wrong format
> collect2: error: ld returned 1 exit status
> .
> .
> [10/31] Compiling C object test-camatch.p/test_test-camatch.c.o
> ninja: build stopped: subcommand failed.
>
> I am using Buildroot as build system and after following similar post in
> https://stackoverflow.com/questions/27967802/libstdc-so-error-adding-symbols-file-in-wrong-format
> <https://github.com/ninja-build/ninja/issues/url> I changed the PATH environment
> like:
>
>
> /root/raspcm4/sources/output/host/bin/:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/raspcm4/sources/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/bin
>
> But still, I end up getting the same errors
>
> Can anyone please let me know how to resolve this issue? Is there any ninja
> build option to be selected in Buildroot?
>
> Your help will be much appreciated.
>
> Thanks in advance
>
> P.S: Please let me know if any info is missing here
>

[-- Attachment #1.2: Type: text/html, Size: 26588 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] Buildroot | ninja build error | /usr/bin/ld:error adding symbols: file in wrong format
  2022-03-31 17:55 [Buildroot] Buildroot | ninja build error | /usr/bin/ld:error adding symbols: file in wrong format Sourabh Hegde
  2022-04-01  9:10 ` Sourabh Hegde
@ 2022-04-01  9:11 ` Quentin Schulz
  2022-04-01  9:42   ` Sourabh Hegde
  1 sibling, 1 reply; 11+ messages in thread
From: Quentin Schulz @ 2022-04-01  9:11 UTC (permalink / raw)
  To: Sourabh Hegde, buildroot

Hi Sourabh Hegde,

On 3/31/22 19:55, Sourabh Hegde wrote:
> Hello All,
> 
> While building casync using ninja build I am facing below errors
> related to /usr/bin/ld:
> . . .error adding symbols: file in wrong format
> 
> I am following "casync" build guideline from
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_systemd_casync-23building-2Dcasync&d=DwIBaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=EZ6d819a1qu3uAFg1GbEGsYi60IPAlDkSahx_NFWucv2-olGfFGlWcnc8_-v_gj4&s=0oAe2qUNmvkBsGYIiapGRQ5OQYDghVxojZm5QaWUwiQ&e=
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ninja-2Dbuild_ninja_issues_url&d=DwIBaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=EZ6d819a1qu3uAFg1GbEGsYi60IPAlDkSahx_NFWucv2-olGfFGlWcnc8_-v_gj4&s=7qFZDk5q2JFekiEteeOVNjQj50e86tte0akp-uMLm7k&e= > , it uses "meson " along
> with ninja build.
> 
> If build failures persist, run "meson setup --wipe" to rebuild from scratch
> using the same options as passed when configuring the build.
> To change option values, run "meson configure" instead.
> ninja: Entering directory build'
> [1/31] Linking target casync-http
> FAILED: casync-http
> cc -o casync-http casync-http.p/src_casync-http.c.o -Wl,--as-needed
> -Wl,--no-undefined
> -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,--start-group src/libshared.a
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcurl.so
> 
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so
> 
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so
> 
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so
> 
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
>   /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
> -lm -Wl,--end-group
> /usr/bin/ld:
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcurl.so:
> error adding symbols: file in wrong format
> collect2: error: ld returned 1 exit status
> [2/31] Linking target test-cachunk
> FAILED: test-cachunk
> cc -o test-cachunk test-cachunk.p/test_test-cachunk.c.o -Wl,--as-needed
> -Wl,--no-undefined
> -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,--start-group src/libshared.a -lacl
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so
> 
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libselinux.so
> 
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
>   /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
> -lm
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so
>   /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so
> -Wl,--end-group -pthread
> /usr/bin/ld:
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so:
> error adding symbols: file in wrong format
> collect2: error: ld returned 1 exit status
> [3/31] Linking target test-cachunker
> FAILED: test-cachunker
> cc -o test-cachunker test-cachunker.p/test_test-cachunker.c.o
> -Wl,--as-needed -Wl,--no-undefined
> -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,--start-group src/libshared.a -lacl
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so
> 
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libselinux.so
> 
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
>   /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
> -lm
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so
>   /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so
> -Wl,--end-group -pthread
> /usr/bin/ld:
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so:
> error adding symbols: file in wrong format
> collect2: error: ld returned 1 exit status
> [4/31] Linking target test-caencoder
> FAILED: test-caencoder
> cc -o test-caencoder test-caencoder.p/test_test-caencoder.c.o
> -Wl,--as-needed -Wl,--no-undefined
> -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> -Wl,--start-group src/libshared.a -lacl
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so
> 
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libselinux.so
> 
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
>   /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
> -lm
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so
>   /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so
> -Wl,--end-group -pthread
> /usr/bin/ld:
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so:
> error adding symbols: file in wrong format
> collect2: error: ld returned 1 exit status
> .
> .
> [10/31] Compiling C object test-camatch.p/test_test-camatch.c.o
> ninja: build stopped: subcommand failed.
> 
> I am using Buildroot as build system and after following similar post in
> https://urldefense.proofpoint.com/v2/url?u=https-3A__stackoverflow.com_questions_27967802_libstdc-2Dso-2Derror-2Dadding-2Dsymbols-2Dfile-2Din-2Dwrong-2Dformat&d=DwIBaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=EZ6d819a1qu3uAFg1GbEGsYi60IPAlDkSahx_NFWucv2-olGfFGlWcnc8_-v_gj4&s=xHy7bTlAyWOY4-lBdA9bwycscXiZBIO-Wkz7PZC9vbs&e=
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ninja-2Dbuild_ninja_issues_url&d=DwIBaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=EZ6d819a1qu3uAFg1GbEGsYi60IPAlDkSahx_NFWucv2-olGfFGlWcnc8_-v_gj4&s=7qFZDk5q2JFekiEteeOVNjQj50e86tte0akp-uMLm7k&e= > I changed the PATH
> environment
> like:
> 
> /root/raspcm4/sources/output/host/bin/:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/raspcm4/sources/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/bin
> 
> But still, I end up getting the same errors
> 
> Can anyone please let me know how to resolve this issue? Is there any ninja
> build option to be selected in Buildroot?
> 

Seems like cc is being used instead of the cross-compiler/linker.

Did you use the meson-package mechanism in Buildroot? c.f. 
https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_meson_based_packages

This should have everything required to compile meson packages. Define 
only the variables that are required and add one by one optional 
variables until you get it to build.

Having the actual package makefile for your casync package would help a 
lot if it still does not work.

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] Buildroot | ninja build error | /usr/bin/ld:error adding symbols: file in wrong format
  2022-04-01  9:11 ` Quentin Schulz
@ 2022-04-01  9:42   ` Sourabh Hegde
  2022-04-01  9:49     ` Quentin Schulz
  0 siblings, 1 reply; 11+ messages in thread
From: Sourabh Hegde @ 2022-04-01  9:42 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 9238 bytes --]

Hello Quentin,

Thanks for the update.

I am following this guideline
https://github.com/systemd/casync#building-casync . It says to build casync
run:

meson build && ninja -C build && sudo ninja -C build install

Actually, meson-build is successful but while running "ninja -C build" I am
getting above errors.

Having the actual package makefile for your casync package would help a
> lot if it still does not work.
>

I found this in
https://github.com/buildroot/buildroot/blob/master/package/casync/casync.mk

But how to use this to compile casync?

Can you please let me know what needs to be done?

Thanks in advance.

Actually, meson-build is successful

On Fri, 1 Apr 2022 at 11:11, Quentin Schulz <
quentin.schulz@theobroma-systems.com> wrote:

> Hi Sourabh Hegde,
>
> On 3/31/22 19:55, Sourabh Hegde wrote:
> > Hello All,
> >
> > While building casync using ninja build I am facing below errors
> > related to /usr/bin/ld:
> > . . .error adding symbols: file in wrong format
> >
> > I am following "casync" build guideline from
> >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_systemd_casync-23building-2Dcasync&d=DwIBaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=EZ6d819a1qu3uAFg1GbEGsYi60IPAlDkSahx_NFWucv2-olGfFGlWcnc8_-v_gj4&s=0oAe2qUNmvkBsGYIiapGRQ5OQYDghVxojZm5QaWUwiQ&e=
> > <
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ninja-2Dbuild_ninja_issues_url&d=DwIBaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=EZ6d819a1qu3uAFg1GbEGsYi60IPAlDkSahx_NFWucv2-olGfFGlWcnc8_-v_gj4&s=7qFZDk5q2JFekiEteeOVNjQj50e86tte0akp-uMLm7k&e=
> > , it uses "meson " along
> > with ninja build.
> >
> > If build failures persist, run "meson setup --wipe" to rebuild from
> scratch
> > using the same options as passed when configuring the build.
> > To change option values, run "meson configure" instead.
> > ninja: Entering directory build'
> > [1/31] Linking target casync-http
> > FAILED: casync-http
> > cc -o casync-http casync-http.p/src_casync-http.c.o -Wl,--as-needed
> > -Wl,--no-undefined
> >
> -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> >
> -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> > -Wl,--start-group src/libshared.a
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcurl.so
> >
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so
> >
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so
> >
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so
> >
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
> >
>  /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
> > -lm -Wl,--end-group
> > /usr/bin/ld:
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcurl.so:
> > error adding symbols: file in wrong format
> > collect2: error: ld returned 1 exit status
> > [2/31] Linking target test-cachunk
> > FAILED: test-cachunk
> > cc -o test-cachunk test-cachunk.p/test_test-cachunk.c.o -Wl,--as-needed
> > -Wl,--no-undefined
> >
> -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> >
> -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> > -Wl,--start-group src/libshared.a -lacl
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so
> >
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libselinux.so
> >
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
> >
>  /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
> > -lm
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so
> >
>  /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so
> > -Wl,--end-group -pthread
> > /usr/bin/ld:
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so:
> > error adding symbols: file in wrong format
> > collect2: error: ld returned 1 exit status
> > [3/31] Linking target test-cachunker
> > FAILED: test-cachunker
> > cc -o test-cachunker test-cachunker.p/test_test-cachunker.c.o
> > -Wl,--as-needed -Wl,--no-undefined
> >
> -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> >
> -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> > -Wl,--start-group src/libshared.a -lacl
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so
> >
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libselinux.so
> >
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
> >
>  /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
> > -lm
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so
> >
>  /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so
> > -Wl,--end-group -pthread
> > /usr/bin/ld:
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so:
> > error adding symbols: file in wrong format
> > collect2: error: ld returned 1 exit status
> > [4/31] Linking target test-caencoder
> > FAILED: test-caencoder
> > cc -o test-caencoder test-caencoder.p/test_test-caencoder.c.o
> > -Wl,--as-needed -Wl,--no-undefined
> >
> -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> >
> -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib
> > -Wl,--start-group src/libshared.a -lacl
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so
> >
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libselinux.so
> >
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so
> >
>  /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so
> > -lm
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so
> >
>  /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so
> > -Wl,--end-group -pthread
> > /usr/bin/ld:
> >
> /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so:
> > error adding symbols: file in wrong format
> > collect2: error: ld returned 1 exit status
> > .
> > .
> > [10/31] Compiling C object test-camatch.p/test_test-camatch.c.o
> > ninja: build stopped: subcommand failed.
> >
> > I am using Buildroot as build system and after following similar post in
> >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__stackoverflow.com_questions_27967802_libstdc-2Dso-2Derror-2Dadding-2Dsymbols-2Dfile-2Din-2Dwrong-2Dformat&d=DwIBaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=EZ6d819a1qu3uAFg1GbEGsYi60IPAlDkSahx_NFWucv2-olGfFGlWcnc8_-v_gj4&s=xHy7bTlAyWOY4-lBdA9bwycscXiZBIO-Wkz7PZC9vbs&e=
> > <
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ninja-2Dbuild_ninja_issues_url&d=DwIBaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=EZ6d819a1qu3uAFg1GbEGsYi60IPAlDkSahx_NFWucv2-olGfFGlWcnc8_-v_gj4&s=7qFZDk5q2JFekiEteeOVNjQj50e86tte0akp-uMLm7k&e=
> > I changed the PATH
> > environment
> > like:
> >
> >
> /root/raspcm4/sources/output/host/bin/:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/raspcm4/sources/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/bin
> >
> > But still, I end up getting the same errors
> >
> > Can anyone please let me know how to resolve this issue? Is there any
> ninja
> > build option to be selected in Buildroot?
> >
>
> Seems like cc is being used instead of the cross-compiler/linker.
>
> Did you use the meson-package mechanism in Buildroot? c.f.
>
> https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_meson_based_packages
>
> This should have everything required to compile meson packages. Define
> only the variables that are required and add one by one optional
> variables until you get it to build.
>
> Having the actual package makefile for your casync package would help a
> lot if it still does not work.
>
> Cheers,
> Quentin
>

[-- Attachment #1.2: Type: text/html, Size: 12487 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] Buildroot | ninja build error | /usr/bin/ld:error adding symbols: file in wrong format
  2022-04-01  9:42   ` Sourabh Hegde
@ 2022-04-01  9:49     ` Quentin Schulz
  2022-04-01 11:41       ` Sourabh Hegde
  0 siblings, 1 reply; 11+ messages in thread
From: Quentin Schulz @ 2022-04-01  9:49 UTC (permalink / raw)
  To: Sourabh Hegde; +Cc: buildroot

Hi,

On 4/1/22 11:42, Sourabh Hegde wrote:
> Hello Quentin,
> 
> Thanks for the update.
> 
> I am following this guideline
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_systemd_casync-23building-2Dcasync&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=E7Vx6coYDXRY655Egik49UZpZDdQ2JWKiYWJBrFF9kw3yPPVRGS-GvW7LrRZTcZV&s=Rs7PUiLj89kkH7rFu4ocmrVT20cGAtkh-dF1BLw4Dns&e=  . It says to build casync
> run:
> 
> meson build && ninja -C build && sudo ninja -C build install
> 
> Actually, meson-build is successful but while running "ninja -C build" I am
> getting above errors.
> 

Upstream projects usually don't account for cross-compilation and some 
tricks might be needed for build systems to correctly compile some 
pieces of software. So just reuse whatever the build system is giving 
you first before trying without. That means using package 
makefiles/recipes if they already exist.

> Having the actual package makefile for your casync package would help a
>> lot if it still does not work.
>>
> 
> I found this in
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_buildroot_buildroot_blob_master_package_casync_casync.mk&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=E7Vx6coYDXRY655Egik49UZpZDdQ2JWKiYWJBrFF9kw3yPPVRGS-GvW7LrRZTcZV&s=qykqjQKn5qe2ldZRFFEFO8SkK7wArzNb80WRnjwPc3s&e=
> 
> But how to use this to compile casync?
> 

make casync

if you want it in an image created by Buildroot, modify your config with 
make menuconfig and save your changes, then run make.

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] Buildroot | ninja build error | /usr/bin/ld:error adding symbols: file in wrong format
  2022-04-01  9:49     ` Quentin Schulz
@ 2022-04-01 11:41       ` Sourabh Hegde
  2022-04-01 11:54         ` Quentin Schulz
  0 siblings, 1 reply; 11+ messages in thread
From: Sourabh Hegde @ 2022-04-01 11:41 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 2804 bytes --]

Hello Quentin,

make casync
>
> if you want it in an image created by Buildroot, modify your config with
> make menuconfig and save your changes, then run make.
>

But will this create binary for host system also? Sorry, its bit confusing
here.

I need casync tool use with "rauc" as given in
https://rauc.readthedocs.io/en/latest/advanced.html#creating-casync-bundles

When I do "rauc convert --cert=<certfile> --key=<keyfile>
--keyring=<keyring> conventional-bundle.raucb casync-bundle.raucb"

I get:

"Failed to create bundle: Failed to start casync: Failed to execute child
process ?casync? (No such file or directory)"

So, casync doesn't exist.

My understanding is that Buildroot should be able to properly set up meson
for cross-compilation.

I ran make casync and now casync is part of rootfs image. But I need casync
on host to use with rauc.

Any advice on how to proceed will be helpful.

Thanks in advance

On Fri, 1 Apr 2022 at 11:50, Quentin Schulz <
quentin.schulz@theobroma-systems.com> wrote:

> Hi,
>
> On 4/1/22 11:42, Sourabh Hegde wrote:
> > Hello Quentin,
> >
> > Thanks for the update.
> >
> > I am following this guideline
> >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_systemd_casync-23building-2Dcasync&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=E7Vx6coYDXRY655Egik49UZpZDdQ2JWKiYWJBrFF9kw3yPPVRGS-GvW7LrRZTcZV&s=Rs7PUiLj89kkH7rFu4ocmrVT20cGAtkh-dF1BLw4Dns&e=
> . It says to build casync
> > run:
> >
> > meson build && ninja -C build && sudo ninja -C build install
> >
> > Actually, meson-build is successful but while running "ninja -C build" I
> am
> > getting above errors.
> >
>
> Upstream projects usually don't account for cross-compilation and some
> tricks might be needed for build systems to correctly compile some
> pieces of software. So just reuse whatever the build system is giving
> you first before trying without. That means using package
> makefiles/recipes if they already exist.
>
> > Having the actual package makefile for your casync package would help a
> >> lot if it still does not work.
> >>
> >
> > I found this in
> >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_buildroot_buildroot_blob_master_package_casync_casync.mk&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=E7Vx6coYDXRY655Egik49UZpZDdQ2JWKiYWJBrFF9kw3yPPVRGS-GvW7LrRZTcZV&s=qykqjQKn5qe2ldZRFFEFO8SkK7wArzNb80WRnjwPc3s&e=
> >
> > But how to use this to compile casync?
> >
>
> make casync
>
> if you want it in an image created by Buildroot, modify your config with
> make menuconfig and save your changes, then run make.
>
> Cheers,
> Quentin
>

[-- Attachment #1.2: Type: text/html, Size: 4641 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] Buildroot | ninja build error | /usr/bin/ld:error adding symbols: file in wrong format
  2022-04-01 11:41       ` Sourabh Hegde
@ 2022-04-01 11:54         ` Quentin Schulz
  2022-04-01 12:29           ` Sourabh Hegde
  0 siblings, 1 reply; 11+ messages in thread
From: Quentin Schulz @ 2022-04-01 11:54 UTC (permalink / raw)
  To: Sourabh Hegde; +Cc: buildroot

Hi Sourabh,

On 4/1/22 13:41, Sourabh Hegde wrote:
> Hello Quentin,
> 
> make casync
>>
>> if you want it in an image created by Buildroot, modify your config with
>> make menuconfig and save your changes, then run make.
>>
> 
> But will this create binary for host system also? Sorry, its bit confusing
> here.
> 

No, host packages and target packages are compiled with a different keyword.

make casync is for target package
make host-casync is for host package

> I need casync tool use with "rauc" as given in
> https://urldefense.proofpoint.com/v2/url?u=https-3A__rauc.readthedocs.io_en_latest_advanced.html-23creating-2Dcasync-2Dbundles&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=AiN2bNa5EFj79y22K554djuFBBXe_MMEIRS1-gwEsbw3ch69jBq4q9j0tm_wz1V8&s=6mSs1PkEXKk01AMnuQKyCAPV0A9euTiPrj_bP4mGHJ0&e=
> 
> When I do "rauc convert --cert=<certfile> --key=<keyfile>
> --keyring=<keyring> conventional-bundle.raucb casync-bundle.raucb"
> 

I assume you need this at build time then since you are talking about 
binary for the host system. In that case, you need to add host-casync to 
your config.

However, casync is currently a target-only package.

To create a host package, you need at the very least to add:

$(eval $(host-meson-package))

at the end of the package/casync/casync.mk file.

This might not be enough and might require some additional tweaks to the 
package makefile.

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] Buildroot | ninja build error | /usr/bin/ld:error adding symbols: file in wrong format
  2022-04-01 11:54         ` Quentin Schulz
@ 2022-04-01 12:29           ` Sourabh Hegde
  2022-04-04  8:36             ` Sourabh Hegde
  0 siblings, 1 reply; 11+ messages in thread
From: Sourabh Hegde @ 2022-04-01 12:29 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 2231 bytes --]

Hello Quentin,

I assume you need this at build time then since you are talking about
> binary for the host system. In that case, you need to add host-casync to
> your config.
>
> However, casync is currently a target-only package.
>

If I understand correctly, then as of now Buildroot can't be used to create
casync host package.

$(eval $(host-meson-package))
>
> at the end of the package/casync/casync.mk file.
>

I will try this solution.

But what could be the other alternative to work with casync?

Thanks in advance

On Fri, 1 Apr 2022 at 13:54, Quentin Schulz <
quentin.schulz@theobroma-systems.com> wrote:

> Hi Sourabh,
>
> On 4/1/22 13:41, Sourabh Hegde wrote:
> > Hello Quentin,
> >
> > make casync
> >>
> >> if you want it in an image created by Buildroot, modify your config with
> >> make menuconfig and save your changes, then run make.
> >>
> >
> > But will this create binary for host system also? Sorry, its bit
> confusing
> > here.
> >
>
> No, host packages and target packages are compiled with a different
> keyword.
>
> make casync is for target package
> make host-casync is for host package
>
> > I need casync tool use with "rauc" as given in
> >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__rauc.readthedocs.io_en_latest_advanced.html-23creating-2Dcasync-2Dbundles&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=AiN2bNa5EFj79y22K554djuFBBXe_MMEIRS1-gwEsbw3ch69jBq4q9j0tm_wz1V8&s=6mSs1PkEXKk01AMnuQKyCAPV0A9euTiPrj_bP4mGHJ0&e=
> >
> > When I do "rauc convert --cert=<certfile> --key=<keyfile>
> > --keyring=<keyring> conventional-bundle.raucb casync-bundle.raucb"
> >
>
> I assume you need this at build time then since you are talking about
> binary for the host system. In that case, you need to add host-casync to
> your config.
>
> However, casync is currently a target-only package.
>
> To create a host package, you need at the very least to add:
>
> $(eval $(host-meson-package))
>
> at the end of the package/casync/casync.mk file.
>
> This might not be enough and might require some additional tweaks to the
> package makefile.
>
> Cheers,
> Quentin
>

[-- Attachment #1.2: Type: text/html, Size: 3677 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] Buildroot | ninja build error | /usr/bin/ld:error adding symbols: file in wrong format
  2022-04-01 12:29           ` Sourabh Hegde
@ 2022-04-04  8:36             ` Sourabh Hegde
  2022-04-04  9:41               ` Quentin Schulz
  2022-04-04 15:17               ` Arnout Vandecappelle
  0 siblings, 2 replies; 11+ messages in thread
From: Sourabh Hegde @ 2022-04-04  8:36 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 3198 bytes --]

Hello Quentin,

I made some progress to build casync as host-casync. I modified casync.mk
file to include "HOST_CASYNC_DEPENDENCIES = host-acl host-libcurl
host-openssl" below "CASYNC_DEPENDENCIES = acl libcurl openssl". And also
added BR2_PACKAGE_HOST_CASYNC=YES to config. Then if I run make host-casync
it results in

make[1]: * No rule to make target 'host-libfuse'

I think this is related to below DEPENDENCY in casync.mk file:
ifeq ($(BR2_PACKAGE_LIBFUSE),y)
CASYNC_DEPENDENCIES += libfuse
CASYNC_CONF_OPTS += -Dfuse=true
else
CASYNC_CONF_OPTS += -Dfuse=false
endif

But I have selected BR2_PACKAGE_LIBFUSE=y in menuconfig. What else should
be selected for "fuse"?

Can you please let me know how to set up buildroot to use build machine
libs?

Thanks in advance.

On Fri, 1 Apr 2022 at 14:29, Sourabh Hegde <hrsourabh011@gmail.com> wrote:

> Hello Quentin,
>
> I assume you need this at build time then since you are talking about
>> binary for the host system. In that case, you need to add host-casync to
>> your config.
>>
>> However, casync is currently a target-only package.
>>
>
> If I understand correctly, then as of now Buildroot can't be used to
> create casync host package.
>
> $(eval $(host-meson-package))
>>
>> at the end of the package/casync/casync.mk file.
>>
>
> I will try this solution.
>
> But what could be the other alternative to work with casync?
>
> Thanks in advance
>
> On Fri, 1 Apr 2022 at 13:54, Quentin Schulz <
> quentin.schulz@theobroma-systems.com> wrote:
>
>> Hi Sourabh,
>>
>> On 4/1/22 13:41, Sourabh Hegde wrote:
>> > Hello Quentin,
>> >
>> > make casync
>> >>
>> >> if you want it in an image created by Buildroot, modify your config
>> with
>> >> make menuconfig and save your changes, then run make.
>> >>
>> >
>> > But will this create binary for host system also? Sorry, its bit
>> confusing
>> > here.
>> >
>>
>> No, host packages and target packages are compiled with a different
>> keyword.
>>
>> make casync is for target package
>> make host-casync is for host package
>>
>> > I need casync tool use with "rauc" as given in
>> >
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__rauc.readthedocs.io_en_latest_advanced.html-23creating-2Dcasync-2Dbundles&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=AiN2bNa5EFj79y22K554djuFBBXe_MMEIRS1-gwEsbw3ch69jBq4q9j0tm_wz1V8&s=6mSs1PkEXKk01AMnuQKyCAPV0A9euTiPrj_bP4mGHJ0&e=
>> >
>> > When I do "rauc convert --cert=<certfile> --key=<keyfile>
>> > --keyring=<keyring> conventional-bundle.raucb casync-bundle.raucb"
>> >
>>
>> I assume you need this at build time then since you are talking about
>> binary for the host system. In that case, you need to add host-casync to
>> your config.
>>
>> However, casync is currently a target-only package.
>>
>> To create a host package, you need at the very least to add:
>>
>> $(eval $(host-meson-package))
>>
>> at the end of the package/casync/casync.mk file.
>>
>> This might not be enough and might require some additional tweaks to the
>> package makefile.
>>
>> Cheers,
>> Quentin
>>
>

[-- Attachment #1.2: Type: text/html, Size: 5043 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] Buildroot | ninja build error | /usr/bin/ld:error adding symbols: file in wrong format
  2022-04-04  8:36             ` Sourabh Hegde
@ 2022-04-04  9:41               ` Quentin Schulz
  2022-04-04 15:17               ` Arnout Vandecappelle
  1 sibling, 0 replies; 11+ messages in thread
From: Quentin Schulz @ 2022-04-04  9:41 UTC (permalink / raw)
  To: Sourabh Hegde; +Cc: buildroot

Hi Sourabh,

On 4/4/22 10:36, Sourabh Hegde wrote:
> Hello Quentin,
> 
> I made some progress to build casync as host-casync. I modified casync.mk
> file to include "HOST_CASYNC_DEPENDENCIES = host-acl host-libcurl
> host-openssl" below "CASYNC_DEPENDENCIES = acl libcurl openssl". And also
> added BR2_PACKAGE_HOST_CASYNC=YES to config. Then if I run make host-casync
> it results in
> 
> make[1]: * No rule to make target 'host-libfuse'
> 

Same as for casync, there's no host package for libfuse right now. You 
could add:
$(eval $(host-autotools-package))
to the bottom of package/libfuse/libfuse.mk and see where it leads you.

> I think this is related to below DEPENDENCY in casync.mk file:
> ifeq ($(BR2_PACKAGE_LIBFUSE),y)
> CASYNC_DEPENDENCIES += libfuse
> CASYNC_CONF_OPTS += -Dfuse=true
> else
> CASYNC_CONF_OPTS += -Dfuse=false
> endif
> 
> But I have selected BR2_PACKAGE_LIBFUSE=y in menuconfig. What else should
> be selected for "fuse"?
> 

I'm surprised CASYNC_DEPENDENCIES += would add to 
HOST_CASYNC_DEPENENCIES but I don't know enough about Buildroot 
makefiles to help with that. I'm puzzled by the error message basically, 
I don't know where Buildroot got the information it needs to pull 
libfuse too.

I'm pretty sure this will be an issue anyways since the presence of 
libfuse target package shouldn't influence the configuration options of 
the host package, only BR2_PACKAGE_HOST_LIBFUSE presence should be taken 
into account for the host casync package.

I'm afraid I won't be of any help in this quest as this is a bit too far 
into Buildroot system for me and I would just dig into the 
documentation, same way you would do :)

Maybe someone else can chime in. In any case, let us know when you find 
out what was needed to make it work (and send patches to Buildroot so 
other people don't have to go through the same pain as you :) ).

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] Buildroot | ninja build error | /usr/bin/ld:error adding symbols: file in wrong format
  2022-04-04  8:36             ` Sourabh Hegde
  2022-04-04  9:41               ` Quentin Schulz
@ 2022-04-04 15:17               ` Arnout Vandecappelle
  1 sibling, 0 replies; 11+ messages in thread
From: Arnout Vandecappelle @ 2022-04-04 15:17 UTC (permalink / raw)
  To: Sourabh Hegde, Quentin Schulz; +Cc: buildroot

  Hi Sourabh,

  Please don't top-post, but reply inline like I do below. Note that this 
requires configuring your mailer to quote replies properly.


On 04/04/2022 10:36, Sourabh Hegde wrote:
> Hello Quentin,
> 
> I made some progress to build casync as host-casync. I modified casync.mk 
> <http://casync.mk> file to include "HOST_CASYNC_DEPENDENCIES = host-acl 
> host-libcurl host-openssl" below "CASYNC_DEPENDENCIES = acl libcurl openssl". 
> And also added BR2_PACKAGE_HOST_CASYNC=YES to config. 

  You don't necessarily need a Config.in option for a host package. Normally, it 
can simply be added to the dependencies of another package and no more.

> Then if I run make 
> host-casync it results in
> 
> make[1]: * No rule to make target 'host-libfuse'

  You said that you added only host-acl, host-libcurl and host-openssl so 
HOST_CASYNC_DEPENDENCIES, so there should be no reason for host-libfuse to be 
built. Are you sure you also didn't accidentally add
HOST_CASYNC_DEPENDENCIES += host-libfuse ?

> 
> I think this is related to below DEPENDENCY in casync.mk <http://casync.mk> file:
> ifeq ($(BR2_PACKAGE_LIBFUSE),y)
> CASYNC_DEPENDENCIES += libfuse

  This only adds the dependency for the target package, not for the host package.


  There should be no reason at all to enable fuse for host-casync. So it's best 
to also set (unconditionally)

HOST_CASYNC_CONF_OPTS += -Dfuse=false


  Regards,
  Arnout

> CASYNC_CONF_OPTS += -Dfuse=true
> else
> CASYNC_CONF_OPTS += -Dfuse=false
> endif
> 
> But I have selected BR2_PACKAGE_LIBFUSE=y in menuconfig. What else should be 
> selected for "fuse"?
> 
> Can you please let me know how to set up buildroot to use build machine libs?
> 
> Thanks in advance.
> 
> On Fri, 1 Apr 2022 at 14:29, Sourabh Hegde <hrsourabh011@gmail.com 
> <mailto:hrsourabh011@gmail.com>> wrote:
> 
>     Hello Quentin,
> 
>         I assume you need this at build time then since you are talking about
>         binary for the host system. In that case, you need to add host-casync to
>         your config.
> 
>         However, casync is currently a target-only package.
> 
> 
>     If I understand correctly, then as of now Buildroot can't be used to create
>     casync host package.
> 
>         $(eval $(host-meson-package))
> 
>         at the end of the package/casync/casync.mk <http://casync.mk/> file.
> 
> 
>     I will try this solution.
> 
>     But what could be the other alternative to work with casync?
> 
>     Thanks in advance
> 
>     On Fri, 1 Apr 2022 at 13:54, Quentin Schulz
>     <quentin.schulz@theobroma-systems.com
>     <mailto:quentin.schulz@theobroma-systems.com>> wrote:
> 
>         Hi Sourabh,
> 
>         On 4/1/22 13:41, Sourabh Hegde wrote:
>          > Hello Quentin,
>          >
>          > make casync
>          >>
>          >> if you want it in an image created by Buildroot, modify your config with
>          >> make menuconfig and save your changes, then run make.
>          >>
>          >
>          > But will this create binary for host system also? Sorry, its bit
>         confusing
>          > here.
>          >
> 
>         No, host packages and target packages are compiled with a different keyword.
> 
>         make casync is for target package
>         make host-casync is for host package
> 
>          > I need casync tool use with "rauc" as given in
>          >
>         https://urldefense.proofpoint.com/v2/url?u=https-3A__rauc.readthedocs.io_en_latest_advanced.html-23creating-2Dcasync-2Dbundles&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=AiN2bNa5EFj79y22K554djuFBBXe_MMEIRS1-gwEsbw3ch69jBq4q9j0tm_wz1V8&s=6mSs1PkEXKk01AMnuQKyCAPV0A9euTiPrj_bP4mGHJ0&e=
>         <https://urldefense.proofpoint.com/v2/url?u=https-3A__rauc.readthedocs.io_en_latest_advanced.html-23creating-2Dcasync-2Dbundles&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=AiN2bNa5EFj79y22K554djuFBBXe_MMEIRS1-gwEsbw3ch69jBq4q9j0tm_wz1V8&s=6mSs1PkEXKk01AMnuQKyCAPV0A9euTiPrj_bP4mGHJ0&e=>
>          >
>          > When I do "rauc convert --cert=<certfile> --key=<keyfile>
>          > --keyring=<keyring> conventional-bundle.raucb casync-bundle.raucb"
>          >
> 
>         I assume you need this at build time then since you are talking about
>         binary for the host system. In that case, you need to add host-casync to
>         your config.
> 
>         However, casync is currently a target-only package.
> 
>         To create a host package, you need at the very least to add:
> 
>         $(eval $(host-meson-package))
> 
>         at the end of the package/casync/casync.mk <http://casync.mk> file.
> 
>         This might not be enough and might require some additional tweaks to the
>         package makefile.
> 
>         Cheers,
>         Quentin
> 
> 
> _______________________________________________
> 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] 11+ messages in thread

end of thread, other threads:[~2022-04-04 15:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 17:55 [Buildroot] Buildroot | ninja build error | /usr/bin/ld:error adding symbols: file in wrong format Sourabh Hegde
2022-04-01  9:10 ` Sourabh Hegde
2022-04-01  9:11 ` Quentin Schulz
2022-04-01  9:42   ` Sourabh Hegde
2022-04-01  9:49     ` Quentin Schulz
2022-04-01 11:41       ` Sourabh Hegde
2022-04-01 11:54         ` Quentin Schulz
2022-04-01 12:29           ` Sourabh Hegde
2022-04-04  8:36             ` Sourabh Hegde
2022-04-04  9:41               ` Quentin Schulz
2022-04-04 15:17               ` Arnout Vandecappelle

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.