how can I publish cpp project
I'd like to ty to create a bot on dpp, installed from vcpkg
how can I set a docker file, to build and run that bot on railway ?
as main questions:
1. how & wich compile I must use, as I suggest I can't use VS build tools
2. how can I install and use vcpkg to install dpp from vcpkg
3. how can I cpecify
-DCMAKE_TOOLCHAIN_FILE
with vcpkg includes68 Replies
Project ID:
N/A
If you're using CMake, you can just use Ninja + Clang
If you send your code, I could try to whip up a dockerfile for you
Are you using CMake?
yep
my message just disapeared, lol)
Try this:
(put that in
Dockerfile
)
Yeah, I see it in the mod channels, there's a new automod feature that's slightly buggy right now, sorryIs there an error message above that?
as I see, only that:
oop
try replacing
apt-get install
with apt-get install -y
k, sec
Just add the
-y
and the pkg-config
to the second install command that was already thereyep, now it builds, but it can't find dpp)
oh, that's cuz of vcpkg path, I guess
I pass
/vcpkg-boot/vcpkg
or vcpkg-boot/vcpkg
, but it still can't find dpp
is there smth like /user/ . . .
must be before it ?nope
just /vcpkg-boot/vcpkg
OH
Add an
ENV VCPKG_PATH=/vcpkg-boot/vcpkg
near the top of the Dockerfile.is it necessary ? I can't just add it into a variables section ?
Oh, oops, you can
it can't find dpp, and idk where it searches
as I suggest, it can't find dpp cuz of its path
but idk where is vcpkg on host, and why cmake didn't find/include it
Do you have a dockerfile, CMakeLists.txt, or vcpkg.json file?
@satan1c
Dockerfile & CMakeLists.txt
for now I'll try to specify dpp triplet as dpp:x64-linux
nah did nothing
Do you mind sending them here or sharing them with me?
shure sec
meh
again diappeared
https://github.com/Satan1c/Geno/tree/dev
Working on it, apologies for the delay.
All fixed! Try this out and tell me if it works, fixed a few other things too but now the only deploy logs for you to worry about on your end include;
https://github.com/Satan1c/Geno/pull/35
Odd, unsure what happened there.
yep, I see the pr, I'll change some moments back, to use env vars
Thank you, Jack
now I can't run it localy)
LINK : fatal error LNK1181: cannot open input file 'sodium.lib'but libsodium is installed
I don't know much of anything about vcpkg or dpp
Is it installed in a location where the linker can find it?
and library search directories include the directory its located in?
its installed in vcpkg, so
target_link_directories(${PROJECT_NAME} PRIVATE $ENV{VCPKG_PATH}/installed/${OS_NAME}/lib)
was as a fix, for drogon, but now idk why I see that
removing target_link_libraries(${PROJECT_NAME} PRIVATE opus sodium)
fix that
on railway all works fine now
replace:
with:
everything works?
Why do you need opus and sodium anyway?
on railway, not on my laptop :c
iirc those are sound-related libraries
did u try this https://discord.com/channels/713503345364697088/1127940136848592938/1128039769310502983
yur it required them
had to install them so the build would complete so its prolly somewhere
thats dpp dependency, for work with sound
this isn't a music bot, is it?
just a sec
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_PATH}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
replace:
with:
with that, I don't need to specify it in commands anymore ?
k, I'll try
should locate automatically
hopefully 🤞
nope, nothing
maybe it'll find by libsodium, not sodium
nah, it didn't
do u know the sodium installation path
and when u run
vcpkg list
, its listed?yep, in lib and include paths of vcpkg
what if
*also, without that bot starts fine
maybe it'll be better to install lobsodium and etc with vcpkg manually in docker
idk why on railway it's not installing them, like on my laptop
only difficult part with dev env on railway is the first deployment or first few before the image caches
*also opus and openssl
¯\_(ツ)_/¯
I just scroll logs, and see that
may it be cuz railway is on ARM cpu, not x64/x86 ?
eh it should work tho, theres nothing in the code pathing out anything for an amd as opposed to anything else, no?
and also, if that was the case, then it mustn't run, but it does
It's Intel
amd64
that's intel
well, AMD
but pretty close
intel and amd arent the same 😭
like comparing intel and nvidia graphics cards
compatible architectures
relatively
yh but i dont think his code references anything like that, the linker and his vcpkg should manage it
apt packages
I've tried add https://github.com/facebookincubator/fizz/blob/a009078d01f476c19a05d3ebc74055a64563d33a/build/fbcode_builder/CMake/FindSodium.cmake to cmakelists, and now new error, on railway
what it trys to find, if
dpp
then where it take -l
, if ld
, then for what -
& pp
what does -l
mean ? idk what it tries to do
oh... now I can't run it on railway, even with cmake/docker files that runs it an hour -l is the argument to link with a library
Could you send your CMakeLists.txt?
Undo your last commit, you removed the bits to configure vcpkg
as I see that's does nothing
for now I can't uderstand from where comes that
ld
& -l
, on railway with that cmake/docker bot just runs or doesn;t find dpp, in #include
omg, it doesn't get env var
from the beginning, it just can't get env a trouble with Drogon, it runs but I'm getting "Application failed to respond" when I'm going to site, I guess it'll be ok if I ask it here, without creating a new thread, or it'll better to create new Probably better to start a new one
Ok