Skip to content
The Chat Archive
mistral-medium· Mistral AI Arena Human Preference 55K

i have this error on compiling gstreamer on postmarketOS. how to solve it [6/6166]…

  1. User

    i have this error on compiling gstreamer on postmarketOS. how to solve it [6/6166] Compiling C object subprojects/openjpeg-2.3.1/src/lib/openjp2/libopenjp2.so.2.3.1.p/pi.c.o ninja: job failed: cc -o subprojects/avtp/libavtp.so.0.1.0 subprojects/avtp/libavtp.so.0.1.0.p/src_avtp.c.o subprojects/avtp/libavtp.so.0.1.0.p/src_avtp_aaf.c.o subprojects/avtp/libavtp.so.0.1.0.p/src_avtp_crf.c.o subprojects/avtp/libavtp.so.0.1.0.p/src_avtp_cvf.c.o subprojects/avtp/libavtp.so.0.1.0.p/src_avtp_ieciidc.c.o subprojects/avtp/libavtp.so.0.1.0.p/src_avtp_stream.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libavtp.so.0 -Wl,--end-group /usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: subprojects/avtp/libavtp.so.0.1.0.p/src_avtp_stream.c.o: in function avtp_stream_pdu_get': /home/mcg/src/gst-build/builddir/../subprojects/avtp/src/avtp_stream.c:116:(.text+0x34): undefined reference to be64toh' /usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: subprojects/avtp/libavtp.so.0.1.0.p/src_avtp_stream.c.o: in function avtp_stream_pdu_set': /home/mcg/src/gst-build/builddir/../subprojects/avtp/src/avtp_stream.c:199:(.text+0x150): undefined reference to htobe64' collect2: error: ld returned 1 exit status

  2. Assistant

    The error message indicates that there are undefined references to the functions be64toh and htobe64 in the file subprojects/avtp/src/avtp_stream.c while linking the libavtp.so.0.1.0 library.

    These functions are part of the standard C library and are used to convert between different byte orders. In this case, they are used to convert 64-bit values between big-endian and host byte order.

    To solve this issue, you need to make sure that the linker is able to find the definitions of these functions. One possible solution is to add the -lbyteswap flag to the linker command line. This flag tells the linker to link against the byteswap library, which provides the necessary functions.

    You can try modifying the build system to add -lbyteswap to the linker flags for the libavtp.so.0.1.0 library. If you are using the meson build system, you can add the following line to the build.ninja file:

    libavtp_so = shared_library('libavtp', 'src/avtp.c', 'src/avtp_aaf.c', 'src/avtp_crf.c', 'src/avtp_cvf.c', 'src/avtp_ieciidc.c', 'src/avtp_stream.c',
                                install: true,
                                link_args: ['-lbyteswap'])
    

    If you are using a different build system, consult its documentation to find out how to add linker flags.

    After modifying the build system, recompile the project and see if the error is resolved. If not, you may need to investigate further to determine why the linker is unable to find the definitions of these functions.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.