Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] error adding symbols: file format not recognized
  • From: Antonio English <antonio.english@xxxxxxxxxxxx>
  • Date: Thu, 21 Sep 2023 14:38:51 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=weareaim.com; dmarc=pass action=none header.from=weareaim.com; dkim=pass header.d=weareaim.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=X31K5htfz72PcSVpuNroCUkBsnaN8siBcJvkT09YLAk=; b=Tql4iGknDJaY2lXAFA7vbATKqRL5ojNlCXET1bWR1Q6BL0tOc/XIU1imRyEPUNsiYzRgwTYC20CbPmWjJEtyBXmXg0kk8Xi9BGf81yQGYK6BPGViJ5JynKtadOY/lctA1V+CBS12LUW6gqBJBLVXuhY7CCXSBUQ1s5fgQLFgKBK4MLIp6ybAoHdGE+/VeiBm3/mAJstaCW4YnMeBHpM3S8SxS3BOdljL35z9NnGfTiT1tRaLMe6gLbtrrwzjKVTboiyx0nVaCHx0O4fIqDYimqW0awbB1TCQegrBGPcZYwekJspgWm+0ASPIHn6eKpVVmWm+rgd+ODMgMXcgRhHbRA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IocSgUe2KE63feavmxB7vkLJFB2UeoD0ggWxuKyRAsIOHE6WznZJrUFogkNR88tDTLSswfVRjB0zCFk/Nd/4A3t5JLgDq+g0hmYuFaP95eAYb8fzqaH78k8NVyOBhNWwPWJIsJBzFCSA29yeaWSO5oq8iBKzmMqrnudrNm6DYtoV1+hfxEAg71jRCBAY47RVnP4TWWKL+ryPhPdj7Ulb1oMuTkRwzInwn69nvttFm7B/Ry6Fi5JVxcl1WgAgUjAIfMaREs0yclbsIfDZwIMBDWTSvVBf9jmlQk9FaxbREoRhF9ftd/Q0r7jq6aKHFmRgt6WN7QI8hX0Mo+Pne2xPPQ==
  • Delivered-to: mosquitto-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/mosquitto-dev/>
  • List-help: <mailto:mosquitto-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/mosquitto-dev>, <mailto:mosquitto-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/mosquitto-dev>, <mailto:mosquitto-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AdnnEleeNDQtIQq8SOCwqSx7dsvaqgFeFuQAAADyv9A=
  • Thread-topic: [mosquitto-dev] error adding symbols: file format not recognized

Hello, thank you for your response. The locations are all on my linux virtual machine. I installed the mosquito library using vcpkg. I am assuming that the libmosquitto_static.a library needs to be the same architecture as the the project that I’m linking the mosquito library to?

The image below is the SDK toolchain for the the Uzone project that I’m trying to add the mosquito library to.

 

From: Norbert Heußer <norbert.heusser@xxxxxxxxxx>
Sent: Thursday, September 21, 2023 8:54 AM
To: General development discussions for the mosquitto project <mosquitto-dev@xxxxxxxxxxx>
Cc: Antonio English <antonio.english@xxxxxxxxxxxx>
Subject: Re: [mosquitto-dev] error adding symbols: file format not recognized

 

Hi Antonio,

 

This sounds like the libmosquitto_static.a you are trying to use does not match your operating system or CPU architecture. The location seems to be some shared folder between a host an a virtual machine so most likely the library is meant for a different type of machine/architecture.

 

Best

Norbert



On 14. Sep 2023, at 16:42, Antonio English via mosquitto-dev <mosquitto-dev@xxxxxxxxxxx> wrote:

 

When I try to build my project, I get “error adding symbols: file format not recognized”. How can I fix this?
[main] Building folder: example_project_v9

[build] Starting build

[proc] Executing command: /opt/ndc/uzone/P41988V3.5.0/sysroots/x86_64-ndclinuxsdk-linux/usr/bin/cmake --build /home/vboxuser/Desktop/repos/UZ_D3/P46177V1.1.0/example_project_v9/build --config Debug --target all --

[build] [3/10  10% :: 2.314] Building CXX object Ndc8/Parameter/CMakeFiles/ndc8_parameter.dir/Misc.cpp.o

[build] [4/10  20% :: 6.383] Building CXX object Ndc8/Parameter/CMakeFiles/ndc8_parameter.dir/Proxy.cpp.o

[build] [5/10  30% :: 12.446] Building CXX object Ndc8/Parameter/CMakeFiles/ndc8_parameter.dir/HandlerMock.cpp.o

[build] [6/10  40% :: 15.924] Building CXX object src/CMakeFiles/uzone_lib.dir/Adder.cpp.o

[build] [6/10  50% :: 16.275] Building CXX object Ndc8/Parameter/CMakeFiles/ndc8_parameter.dir/Handler.cpp.o

[build] [7/10  60% :: 16.600] Linking CXX static library Ndc8/Parameter/libndc8_parameter.a

[build] [8/10  70% :: 16.770] Linking CXX static library src/libuzone_lib.a

[build] [8/10  80% :: 21.155] Building CXX object uzone/CMakeFiles/uzone_app.dir/main.cpp.o

[build] [9/10  90% :: 21.268] Linking CXX executable uzone/uzone_app

[build] FAILED: uzone/uzone_app

[build] : && /opt/ndc/uzone/P41988V3.5.0/sysroots/x86_64-ndclinuxsdk-linux/usr/bin/arm-ndclinux-linux-gnueabi/arm-ndclinux-linux-gnueabi-g++   -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/ndc/uzone/P41988V3.5.0/sysroots/cortexa9t2hf-neon-ndclinux-linux-gnueabi --sysroot=/opt/ndc/uzone/P41988V3.5.0/sysroots/cortexa9t2hf-neon-ndclinux-linux-gnueabi  -g  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed uzone/CMakeFiles/uzone_app.dir/main.cpp.o  -o uzone/uzone_app -L/home/vboxuser/Desktop/repos/UZ_D3/P46177V1.1.0/ndc8api/c++/Ndc8/Parameter/../../../Ndc8Lib -Wl,-rpath,/home/vboxuser/Desktop/repos/UZ_D3/P46177V1.1.0/ndc8api/c++/Ndc8/Parameter/../../../Ndc8Lib  src/libuzone_lib.a  Ndc8/Parameter/libndc8_parameter.a  /opt/ndc/uzone/P41988V3.5.0/sysroots/cortexa9t2hf-neon-ndclinux-linux-gnueabi/usr/lib/libspdlog.so.1.9.2  /opt/ndc/uzone/P41988V3.5.0/sysroots/cortexa9t2hf-neon-ndclinux-linux-gnueabi/usr/lib/libfmt.so.8.1.1  -Wl,--as-needed  -Wl,-rpath=/opt/lib  -lndc8lib  -lpthread  /home/vboxuser/vcpkg/installed/x64-linux/debug/lib/libmosquitto_static.a  /home/vboxuser/vcpkg/installed/x64-linux/debug/lib/libmosquittopp_static.a && :

[build] /opt/ndc/uzone/P41988V3.5.0/sysroots/x86_64-ndclinuxsdk-linux/usr/libexec/arm-ndclinux-linux-gnueabi/gcc/arm-ndclinux-linux-gnueabi/9.3.0/real-ld: /home/vboxuser/vcpkg/installed/x64-linux/debug/lib/libmosquitto_static.a: error adding symbols: file format not recognized

[build] collect2: error: ld returned 1 exit status

[build] ninja: build stopped: subcommand failed.

[proc] The command: /opt/ndc/uzone/P41988V3.5.0/sysroots/x86_64-ndclinuxsdk-linux/usr/bin/cmake --build /home/vboxuser/Desktop/repos/UZ_D3/P46177V1.1.0/example_project_v9/build --config Debug --target all -- exited with code: 1

[driver] Build completed: 00:00:21.335

[build] Build finished with exit code 1




I have installed Mosquitto using vcpkg. 
here is my Cmake file :
add_library(uzone_lib STATIC

    Adder.h

    Adder.cpp)

target_link_libraries(uzone_lib PUBLIC ndc8_parameter)

target_include_directories(uzone_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

 

include("/home/vboxuser/vcpkg/scripts/buildsystems/vcpkg.cmake")

find_package(mosquitto REQUIRED)

target_include_directories(uzone_lib PRIVATE ${MOSQUITTO_INCLUDE_DIRS})

target_link_libraries(uzone_lib  PRIVATE ${MOSQUITTO_LIBRARIES})

 

_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/mosquitto-dev

 

-- 

Norbert Heußer

Senior Developer | Cedalo GmbH

Tel: +49 173 936 43 63

 

Cedalo GmbH

The company behind Eclipse Mosquitto and Eclipse Streamsheets

Geschäftsführer: Philipp Struss, Philip Ackermann, Dr. Stefan Lölkes Registergericht: Amtsgericht Freiburg, HRB 725414

---------------------------------------------------------------------------------------------

 

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

 

 

 


Back to the top