Nightmare1
@Nightmare1
Программист

По какой причине несовместимость библиотек?

Список выволда команды file для группы объектов 1.

spoiler
[nightmare@nightmare-tufgamingfx505gtfx505gt Garrys Mod 10]$ file *
BaseServer.d:              ASCII text
BaseServer.o:              ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
class.d:                   ASCII text
class_info.d:              ASCII text
class_info.o:              ELF 32-bit LSB relocatable, Intel 80386, version 1 (GNU/Linux), not stripped
class.o:                   ELF 32-bit LSB relocatable, Intel 80386, version 1 (GNU/Linux), not stripped
class_registry.d:          ASCII text
class_registry.o:          ELF 32-bit LSB relocatable, Intel 80386, version 1 (GNU/Linux), not stripped
class_rep.d:               ASCII text
class_rep.o:               ELF 32-bit LSB relocatable, Intel 80386, version 1 (GNU/Linux), not stripped
Console.d:                 ASCII text
Console.o:                 ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
CountryCodes.d:            ASCII text
CountryCodes.o:            ELF 32-bit LSB relocatable, Intel 80386, version 1 (GNU/Linux), not stripped
create_class.d:            ASCII text
create_class.o:            ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
crypto.d:                  ASCII text


Объектные файлы библиотеки включаемой

spoiler
[nightmare@nightmare-tufgamingfx505gtfx505gt Garrys Mod 10]$ file *
[nightmare@nightmare-tufgamingfx505gtfx505gt un-packed]$ file *
accessor_tests.cpp.o:                  ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
AssertException.cpp.o:                 ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
asyncrt_utils.cpp.o:                   ELF 32-bit LSB relocatable, Intel 80386, version 1 (GNU/Linux), not stripped
authentication_tests.cpp.o:            ELF 32-bit LSB relocatable, Intel 80386, version 1 (GNU/Linux), not stripped
base64.cpp.o:                          ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
building_request_tests.cpp.o:          ELF 32-bit LSB relocatable, Intel 80386, version 1 (GNU/Linux), not stripped
building_response_tests.cpp.o:         ELF 32-bit LSB relocatable, Intel 80386, version 1 (GNU/Linux), not stripped
client_construction.cpp.o:             ELF 32-bit LSB relocatable, Intel 80386, version 1 (GNU/Linux), not stripped
close_tests.cpp.o:                     ELF 32-bit LSB relocatable, Intel 80386, version 1 (GNU/Linux), not stripped
combining_tests.cpp.o:                 ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
CompositeTestReporter.cpp.o:           ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
compression_tests.cpp.o:               ELF 32-bit LSB relocatable, Intel 80386, version 1 (GNU/Linux), not stripped
connection_pool_tests.cpp.o:           ELF 32-bit LSB relocatable, Intel 80386, version 1 (GNU/Linux), not stripped
connections_and_errors.cpp.o:          ELF 32-bit LSB relocatable, Intel 80386, version 1 (GNU/Linux), not stripped
construction_tests.cpp.o:              ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
constructor_tests.cpp.o:               ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
conversions_tests.cpp.o:               ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
CurrentTest.cpp.o:                     ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped


Ошибка сборки
[nightmare@nightmare-tufgamingfx505gtfx505gt projects]$ make Garrys\ Mod\ 10 config=release
==== Building Garrys Mod 10 (release) ====
Linking Garrys Mod 10
/usr/sbin/ld: skipping incompatible ../deps/cpprestsdk/build.release/Release/Binaries/libcpprest.a when searching for -lcpprest
/usr/sbin/ld: cannot find -lcpprest: No such file or directory
/usr/sbin/ld: skipping incompatible ../deps/cryptopp/libcryptopp.a when searching for -lcryptopp
/usr/sbin/ld: cannot find -lcryptopp: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [Garrys Mod 10.make:145: bin/Release/libGarrys] Error 1
make: *** [Makefile:51: Garrys Mod 10] Error 2


Почему несовместима библиотека cpprestsdk.a с файлами проекта?*

https://pastebin.com/dXX2g7DH
https://pastebin.com/X0iYgKep

[nightmare@nightmare-tufgamingfx505gtfx505gt ~]$ screenfetch

 ██████████████████  ████████     nightmare@nightmare-tufgamingfx505gtfx505gt
 ██████████████████  ████████     OS: Manjaro 21.2.6 Qonos
 ██████████████████  ████████     Kernel: x86_64 Linux 5.15.32-1-MANJARO
 ██████████████████  ████████     Uptime: 4h 42m
 ████████            ████████     Packages: 1189
 ████████  ████████  ████████     Shell: bash 5.1.16
 ████████  ████████  ████████     Resolution: 1600x900
 ████████  ████████  ████████     DE: Xfce4
 ████████  ████████  ████████     WM: Xfwm4
 ████████  ████████  ████████     WM Theme: Matcha-sea
 ████████  ████████  ████████     GTK Theme: Matcha-sea [GTK2]
 ████████  ████████  ████████     Icon Theme: Papirus-Maia
 ████████  ████████  ████████     Font: Noto Sans 10
 ████████  ████████  ████████     Disk: 471G / 3,7T (13%)
                                  CPU: AMD A12-9800E RADEON R7, 12 COMPUTE CORES 4C+8G @ 4x 3.1GHz
                                  GPU: AMD/ATI Wani [Radeon R5/R6/R7 Graphics]
                                  RAM: 3167MiB / 6938MiB


[nightmare@nightmare-tufgamingfx505gtfx505gt Garrys Mod 10]$ ld --version
GNU ld (GNU Binutils) 2.38
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
  • Вопрос задан
  • 168 просмотров
Пригласить эксперта
Ответы на вопрос 1
@res2001
Developer, ex-admin
Тут скорее причина не в "несовместимости", а в "cannot find -lcpprest: No such file or directory"
Проверьте существует ли библиотека по указанному пути. Скорее всего ее нет.
Надо разобраться почему ее нет. Я так понимаю, она должна собраться вместе со всем остальным.
Может не хватает каких-то ключей для сборки и т.п.

При сборке включите режим verbose и проверьте весь вывод make, есть ли там упоминание о сборке libcpprest.a
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы