Skip to content

Linking error: multiple definition of '_mbox_fd' #2

@Razamuhin

Description

@Razamuhin

Attempting to compile on Raspberry Pi 3B+ gives the following error message:

/usr/bin/ld: CMakeFiles/mipea.dir/src/mipea.c.o:/home/nova/pi-sat/cfs/apps/mipea/src/dma.h:106: multiple definition of `_mbox_fd'; CMakeFiles/mipea.dir/src/dma.c.o:/home/nova/pi-sat/cfs/apps/mipea/src/dma.h:106: first defined here
collect2: error: ld returned 1 exit status
make[7]: *** [apps/mipea/CMakeFiles/mipea.dir/build.make:253: apps/mipea/mipea.so] Error 1
make[6]: *** [CMakeFiles/Makefile2:1635: apps/mipea/CMakeFiles/mipea.dir/all] Error 2
make[5]: *** [Makefile:160: all] Error 2
make[4]: *** [CMakeFiles/native_default_cpu1-install.dir/build.make:76: CMakeFiles/native_default_cpu1-install] Error 2
make[3]: *** [CMakeFiles/Makefile2:512: CMakeFiles/native_default_cpu1-install.dir/all] Error 2
make[2]: *** [CMakeFiles/Makefile2:220: CMakeFiles/mission-install.dir/rule] Error 2
make[1]: *** [Makefile:207: mission-install] Error 2
make: *** [Makefile:123: install] Error 2

I've tried editing dma.h to include a '#pragma once' statement, and I've tried wrapping the offending variable with 'ifndef _mbox_fd ... endif', but no luck.

Attempting to compile on a Raspberry Pi 3B+ running Raspbian 11 (bullseye).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions