Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2020-04-14 00:00:00Z and 2020-04-15 00:00:00Z
Avatar
@Deleted User first get msys2
Avatar
do we have stderror in system.c?
Avatar
stderror?
09:57
you mean the stream?
09:58
strerror
09:58
my bad
09:58
typo
09:58
we dont have it
Avatar
[quakenet] ChillerDragun BOT 2020-04-14 10:00:42Z
bru sometimes i feel like prior to microsoft taking over github there were less 500 errors
Avatar
it's time I figure out wth is wrong with the macOS CI
Avatar
[quakenet] ChillerDragun BOT 2020-04-14 10:01:27Z
Learath big mac guy :D thanks for all ur efforts <3
Avatar
The Big Mac is a hamburger sold by international fast food restaurant chain McDonald's. It was introduced in the Greater Pittsburgh area, in 1967 and nationwide in 1968. It is one of the company's flagship products.
Avatar
I seem to be the only one with a mac that seems to be obsessed enough to debug the mess that is macOS
10:02
😄
10:04
i didnt open ports
10:05
:O
Avatar
with some nats it works without any manual forwarding
10:05
just by sending packets
10:05
(same for my nat btw)
Avatar
hm wait i try with it off
Avatar
oh
10:05
it worked with upnp
10:05
nice 🙂
10:06
(try a different port, it might persist otherwise)
Avatar
routers do all kinds of diiiirty hacks to keep the experience user friendly
Avatar
with upnp off it doesnt register
Avatar
ah 🙂
10:07
good job 👍
Avatar
I'm updating xcode again
10:11
time to break everything and quit coding for another month
Avatar
@Learath2 I am installing it
Avatar
@Ryozuki your fixes in text.cpp create a infinite loop e.g. in the tee setting page if(!Character) break; line 924
10:39
@Learath2 installed msys2
10:39
@deen you probably need to release a new client version, if that is in it cde63e2f48fde6f3dca2a3cc695b33db55be2c0e "Fix TexEx UB"
Avatar
you do a pacman -Syuu then you restart msys, then you do another pacman -Syuu then you do pacboy -S gcc:x
10:42
you also need pacman -S cmake make
Avatar
a minute . . .
10:49
@Deleted User should i just remove that check?
Avatar
well for now yes, that whole function is a big mess, so u probs would need to understand everything so it works correctly without the memory leak xD
Avatar
Jupstar ✪Today at 12:37 @Ryozuki your fixes in text.cpp create a infinite loop e.g. in the tee setting page if(!Character) break; line 924 RyozukiToday at 12:46 oh @Jupstar ✪ should i just remove that check? Jupstar ✪Today at 12:50 well for now yes, that whole function is a big mess, so u probs would need to understand everything so it works correctly without the memory leak xD
Avatar
xDDDDDDDDDDDD
10:58
ea7f3f0 prevent endless loop - Ryozuki 6e44394 Merge pull request #2140 from Ryozuki/pr_fix_endless_loop - def-
Avatar
Trafalgar Law 2020-04-14 11:12:18Z
If some has time, could some take a look on ddnet7 and find these bugs? [2020-04-14 11:42:07][server]: 'New' -> 'New' [2020-04-14 11:42:07][server]: ClientID=55 authed with key=default_mod (moderator) [2020-04-14 11:42:07][sql]: Getting best time done [2020-04-14 11:42:08][server]: client dropped. cid=55 addr=<{unknown type 0}> reason='Error sending data' [2020-04-14 11:42:08][game]: kill killer='55:0:New' victim='55:0:New' weapon=-3 special=0 #0 0x00005555555a9ca6 in CServer::UpdateClientRconCommands (this=0x7ffff62e5010) at /opt/twserver/git/ddrace/src/engine/server/server.cpp:897 #1 0x00005555555ad6e3 in CServer::Run (this=0x7ffff62e5010) at /opt/twserver/git/ddrace/src/engine/server/server.cpp:1672 #2 0x00005555555b1108 in main (argc=2, argv=0x7fffffffe488) at /opt/twserver/git/ddrace/src/engine/server/server.cpp:2504 And [2020-04-13 19:53:36][server]: ClientID=40 authed with key=default_mod (moderator) [2020-04-13 19:53:37][server]: client dropped. cid=40 addr=<{unknown type 0}> reason='Error sending data' [2020-04-13 19:53:37][game]: kill killer='40:0:Amber Zahn' victim='40:0:Amber Zahn' weapon=-3 special=0 #0 0x00005555555a9f54 in CServer::UpdateClientMapListEntries (this=0x7ffff62e5010) at /opt/twserver/git/ddrace/src/engine/server/server.cpp:927 #1 0x00005555555ad6f2 in CServer::Run (this=0x7ffff62e5010) at /opt/twserver/git/ddrace/src/engine/server/server.cpp:1673 #2 0x00005555555b1108 in main (argc=2, argv=0x7fffffffe488) at /opt/twserver/git/ddrace/src/engine/server/server.cpp:2504 I can't reproduce it, just what I can say it happens when some mods try to login
Avatar
@Deleted User why? the endless loop version wasn'T released
Avatar
yeah that was the question 😄
Avatar
@Learath2 complete
Avatar
You cd over to where ddnet is
11:20
you do mkdir build && cd build && cmake -G"MSYS Makefile" .. && make
11:23
@Trafalgar Law I tried to debug that for an hour or so, without being able to reproduce it it's just pretty much impossible
11:24
maybe if you get me a core dump and the binary I can try to take another look
11:26
@deen I'm sorry to report that curl is broken again
11:27
seems you compiled without ssl
Avatar
@Learath2 where should I put these commands?
Avatar
in msys, you cd to the directory of ddnet
11:27
then you do that
Avatar
in errors
11:27
it *
Avatar
show me the errors and maybe I can help
11:27
I'm not telepathic
Avatar
Trafalgar Law 2020-04-14 11:31:28Z
@Learath2 I will send you the core dumps in few minutes
Avatar
don't forget the binary, without the binary coredumps are not very useful
11:35
@Learath2 It's the error
Avatar
first do the cd
11:35
have you ever used a terminal even? 😛
11:36
also I don't think msys mounts C at C:
Avatar
I write the cd and enter
11:37
I > have you ever used a terminal even? 😛 @Learath2 Yes. Cmd and powershell pepeH
Avatar
okay, problem is that you are using \ there and that c isnt mounted at C:
11:38
the path should be /c/Users/HamidReza/Desktop/ddnet-master/build
11:40
on unix-like shells \ escapes the next character, that \ at the end of the line is escaping the newline so the command isn't executing
Avatar
I've never worked with C, before.
11:41
Thanks for info
11:42
I will test that after my lunch. 😐
Avatar
dont put make
Avatar
type cmake ..
12:04
and then after it finishes
12:04
type make
Avatar
not just cmake
12:04
he needs the -G too
Avatar
when I type cmake -G"MSYS Makefile" .. it disappears and nothing happens
Avatar
maybe they merged the generators
12:07
just do cmake ..
12:07
12:07
interesting
12:08
"with a very low number of source code comments" justatest
Avatar
teeworlds is about as well documented as macOS
Avatar
our work is worth 2.5M dollars
12:08
lmao
Avatar
I'll accept a check any time
Avatar
@Learath2 It has a lot of errors (for e.g. The CXX compiler identification is unknown and also for C)
Avatar
well first try gcc --version
12:10
let's see if you installed gcc correctly
Avatar
command not found
Avatar
okay did you do pacboy -S gcc:x
Avatar
yes
12:11
I think it downloaded 58 mb
12:11
and then installed it
Avatar
well try a find / | grep gcc
12:12
see I'm trying to do this from memory, I don't have windows installed, anywhere to check
Avatar
A lot of sentences appeared
Avatar
well show me
Avatar
ok
Avatar
maybe try x86_64-w64-mingw32-gcc --version too
12:13
that could work
Avatar
didn't work, let me show you
12:25
@Learath2
Avatar
@Learath2 you told me to use --without-ssl. so now i should enable it again?
Avatar
@Learath2 I sent a video link which has all of the lines in it.
Avatar
@deen huh, I compiled with --without-ssl --with-secure-transport it worked just fine
12:40
can you check the output of configure?
12:45
@Deleted User hmm, you have gcc, maybe you don't have it in your path?
12:45
check echo $PATH
Avatar
let me check
12:47
Avatar
no not your windows path
12:48
msys has it's own path
12:48
that's why I said echo $PATH
Avatar
Oh I didn't see this.
12:50
It gave me the path of powershell when I entered it.
Avatar
huh, maybe they implement it different nowadays
12:51
anyway try export PATH=$PATH:/mingw64/bin
12:52
gcc --version should work after then
Avatar
worked just fine
12:54
Avatar
okay, now let's try cmake again
12:55
cmake ..
Avatar
it's working . . .
Avatar
lets see if it fails or not
Avatar
It's working, but couldn't find some of packages
12:58
Failed
Avatar
try rm -rf * to clear it, then cmake -DPREFER_BUNDLED_LIBS=ON ..
Avatar
A couple of CMakeLists.txt errors
12:59
not the command that you said (edited)
12:59
I said cmake ..
Avatar
well it'd be nice if you could show me the errors at least
Avatar
You must install Curl to compile DDNet You must install Python to compile DDNet You must install Freetype to compile the DDNet client You must install ogg to compile the DDNet client You must install Opus to compile the DDNet client You must install Opusfile to compile the DDNet client You must install SDL2 to compile the DDNet client (edited)
Avatar
Download ddnet-libs and extract them to your ddnet directory
Avatar
oh did you get ddnet-libs, yeah
13:06
you also need python
Avatar
python is installed
13:06
Python 3.8.2
Avatar
no he need just libs
Avatar
check python --version
13:06
@Vexar we don't ship python in ddnet-libs
Avatar
command not found
Avatar
Precompiled libraries and headers of the dependencies of DDNet - ddnet/ddnet-libs
Avatar
see, python is at the very least not in PATH
Avatar
windows path?
Avatar
@Deleted User add that to path aswell
13:07
just do export PATH=$PATH:<pythonpath>
13:07
you will need ddnet-libs too
Avatar
about the pythonpath, should I copy the directory of the program?
Avatar
the directory where python.exe it
13:09
is*
Avatar
C:\Users\HamidReza\AppData\Local\Programs\Python\Python38-32
13:09
python.exe is here
13:10
should I enter the full path?
Avatar
yes, but C: is /c in msys
13:11
and the \s all need to be /s
Avatar
export PATH=$PATH:/c/Users/HamidReza/Appdata/Local/Programs/Python/Python38-32 (edited)
13:12
you mean something like this?
13:16
So, where should I copy the ddnet-libs?
13:19
@Learath2
Avatar
next to the build folder
Avatar
in ddnet-master folder?
Avatar
just the dlls?
13:22
@Learath2
Avatar
no the entire ddnet-libs folder
Avatar
ddnet-libs-master folder?
Avatar
what is inside it?
Avatar
5 folders
13:23
curl, freetype, mysql, opus, sdl
13:23
name of the folders
Avatar
rename it to ddnet-libs put it in next to build
13:24
inside ddnet-master that is
Avatar
inside ddnet-master that is
@Learath2 I did all you said. the errors are the same just python is removed from the errors.
Avatar
clean out the build folder and try again
13:34
if it doesn't work, clean it out again, then try cmake -DPREFER_BUNDLED_LIBS=ON .. instead
Avatar
the same errors
13:37
I cleaned and tried cmake .. then I cleaned it and tried cmake -DPREFER_BUNDLED_LIBS=ON ..
13:37
I have the same errorsw
13:38
@Learath2
Avatar
uff, I hate debugging cmake problems 😦
13:39
@heinrich5991 where does cmake debug output go?
Avatar
did you put that 5 folder in ddnet-libs ?
Avatar
yes
Avatar
check your CMakeCache.txt
13:41
that the path location is correct for libraries (edited)
Avatar
which line?
Avatar
for example
13:43
CURL_INCLUDEDIR
13:43
or CURL_LIBRARY
Avatar
CURL_INCLUDEDIR would never be correct when cmake couldn't even find it to begin with
Avatar
you can manually set location for libraries
13:44
no iknow
13:44
i mean he can set them manually if cmake unable find them
Avatar
CURL_INCLUDEDIR:PATH=CURL_INCLUDEDIR-NOTFOUND
13:45
CURL_INCLUDEDIR:PATH=C:/ddnet/ddnet-libs/curl/include
Avatar
shoouldn't it be /c/Users/HamidReza/Desktop/ddnet-master/ddnet-libs/curl/include ?
Avatar
yes it should
13:48
but it's a little difficult for you to set all path manually
13:49
do you use cmake gui ?
Avatar
I have it, but, now, I am using msys
Avatar
this is just all wrong, cmake should be perfectly capable of finding the libraries itself
Avatar
Learath right
13:50
i think you better use cmake gui
Avatar
let me take a try
Avatar
Good luck
Avatar
you can't configure for a msys build from the gui unless the gui can select generators
13:52
@heinrich5991 cmon, I'll do the debugging, just tell me what output would help figure out why cmake can't find packages
13:53
I'll just install windows then I guess
Avatar
CMake Error: The source "C:/Users/HamidReza/Desktop/ddnet-master/CMakeLists.txt" does not match the source "/c/Users/HamidReza/Desktop/ddnet-master/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
13:54
when I use the GUI
13:54
how can I change the generator?
13:55
it's on Unix makefiles
Avatar
that shouldn't be C:/Users/... ?
Avatar
I can't edit it
13:56
in the GUI
Avatar
@Vexar inside msys you use / for paths and c is mounted in /c/
Avatar
@Deleted User first clear your build folder
13:56
then try the gui
13:56
remember to set unix makefiles
13:56
actually I don't think this'll work at all, it won't find mingw properly
13:57
maybe if you add msys's mingw bin folder to your path and used the mingw toolchain
Avatar
the same error
Avatar
or just wait for like 30 minutes for this vm to install and I'll just take a look myself
Avatar
VM?
13:58
Virtual Box?
13:59
Oh you meant Virtual Machine
13:59
ok
Avatar
Is it complete? (edited)
14:18
@Learath2
Avatar
it works like shit...
14:18
takes a while to move the mouse at turtle speed
Avatar
After a cup of tea, I will test it in another directory
14:19
With Gui
Avatar
I miss my desktop so much 😦
14:30
which one should I use?
Avatar
Unix Makefiles
Avatar
don't have it
Avatar
what do you even have?
Avatar
let me check again
14:31
I have it
14:31
my bad
Avatar
and you need to specify a toolchain
Avatar
third checkbox?
14:33
@Learath2
14:35
should I choose the third checkbox?
14:37
where is the toolchain?
Avatar
in the cmake foldr
Avatar
there are a lot of files
14:37
not a lot
14:37
3 toolchains
14:38
which one should I use? (edited)
14:38
darwin.toolchain mingw32.toolchain mingw64.toolchain (edited)
14:39
mingw64?
Avatar
mingw64 is the one you want
Avatar
ok
14:41
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
Avatar
yeah, the windows native cmake gui can't find the msys tools
Avatar
export PATH$PATH:/c/.../ddnet-libs what do you think about this?
14:43
should It work?
Avatar
very unlitely
14:45
unlikely, but you can try
14:50
ok, I got the stupid vm to work
14:50
let's see how this is supposed to be done
Avatar
I really don't know why it's not working
14:53
it should work
14:55
@Learath2 are you using linux?
14:56
or Mac OS?
Avatar
I'm on macOS right now, but I have linux on my actual computer
Avatar
Have you ever compiled this game? with which tool? (edited)
14:59
And on which OS?
Avatar
I compiled it on every single OS at one time with cmake
14:59
haven't touched windows in a couple years though
Avatar
@Deleted User you want compile ddnet on windows with cmake and visual studio ?
Avatar
without visual studio\
15:01
with anything else
Avatar
I can help you with visual studio and cmake
Avatar
I just have Visual studio 2017 express
Avatar
I'm waiting for msys to download gcc
15:01
you can compile with vs2017
Avatar
I tried
Avatar
is express edition have c++ ?
Avatar
This is my problem. I don't know
Avatar
well I'll let you know how to do it with msys in about 20 minutes
15:02
with vs, you can follow @heinrich5991's guide on the forum
Avatar
I remember that we use vs 2010 express c++ and bam to compile ddnet before version 10 maybe you able to use vs 2017 express c++ and cmake to compile latest version of ddnet
Avatar
I need some help
Avatar
I can tell 100% work with download visual studio 2019 community and latest cmake version
15:04
😄
Avatar
This was useful to people in the past
Avatar
The main problem is my internet
15:04
it's speed is 50kb or lower 😐
Avatar
where are you come from ?
Avatar
IRAN
Avatar
Use irancell or mci isp
15:05
if you have 4G on your phone
Avatar
ah, 50k is not fun to work with
15:06
been there, done that 😦
Avatar
Iran's networks are ruined right now
Avatar
And I should buy unlimited network for night for doing that
Avatar
yeah you should
Avatar
I'm downloading gcc
Avatar
let me check vs 2017 express
Avatar
you can do it with vs2017 express
Avatar
Still? :?
Avatar
but either way you need to get the windows sdk, c/c++ extensions and stuff, it'll take a lot of internet 🙂
15:09
@Deleted User that forum thread I linked uses vs2017
Avatar
that was community edition of visual studio 2017
Avatar
I read all of these posts
15:10
the button that he chosen was not available in mine (edited)
Avatar
express shouldn't be any different
15:10
atleast i don't remember so
15:10
tbh back when I last used VS it was a paid tool so I'm not completely sure
Avatar
@Vexar Do you test the VS 2017 express?
15:12
i using 2019 community
Avatar
If I buy an unlimited net, I will download the latest version :/
15:15
@Vexar @Learath2 What about VS Code?
Avatar
never tested
Avatar
It's 300mg
15:15
I think
Avatar
VSCode doesn't have a builder
Avatar
you should download plugins for vs code
15:17
and i never tested vs code to see it's work with ddnet or not
Avatar
it works fine for coding, it doesn't come with a compiler
15:19
it's just a text editor
Avatar
yeah it's more like nodepad++ or sublime text
Avatar
I saw my brother a time when he was running some javascript codes in it I think
Avatar
vscode is based on electron, which is just a chromium browser stripped down, so it has a js engine in it
15:21
I think it runs v8
Avatar
@Learath2 it is possible to increase ddnet max clients slots ?
Avatar
more then 64?
Avatar
if you can code it, sure
Avatar
I used chillerdragon github to do it
15:23
but it's required to some changes in client side too
15:23
like scoreboard
Avatar
@Vexar Can you compile DDNet ++ for me? : /
Avatar
chillerdragon's DDNet ?
Avatar
Yes.
Avatar
yes wait download it
Avatar
Based on DDraceNetwork by deen & contributors (www.ddnet.tw) which is based on the great game teeworlds (www.teeworlds.com). - DDNetPP/DDNetPP
15:27
yes wait download it
@Vexar Are you compiling it?
Avatar
Ok.
Avatar
okay figured it out with msys
15:32
you need to do pacman -R cmake then pacboy -S cmake:x
15:32
and use the shortcut for mingw64 while launching msys, not just msys2
Avatar
thanks
15:33
@Learath2 I didn't understand the last sentence
Avatar
msys2 creates 3 shortcuts in your start menu when you install it
15:34
you need to use the mingw 64 one
Avatar
oh
Avatar
@Learath2 you think do you have time to work on 128 slots server/client version of ddnet ?
Avatar
@Vexar when I launch this file, nothing happens
Avatar
you also do cmake -G"MSYS Makefiles" ..
15:38
@Vexar idk, 128 slots is just too much
15:38
it doesn't fit well on the scoreboard, the servers are never filled
Avatar
@Deleted User you need to download chiller's map and autoexec_server.cfg
15:41
@Learath2 no i know but i think it's ganna be be better to have more slots and in client side it could be a scoreboard with scroll bar like samp i think 😄
Avatar
well I don't like it and when I do projects I don't like I never finish them
15:42
you'll have to find someone else 🙂
Avatar
yeah you right forget that
Avatar
@Deleted User well msys2 works for me
Avatar
let me test . . .
Avatar
heh, virtualboxes implementation of opengl doesn't work too well with teeworlds rendering, but I can even run the built client
Avatar
@Learath2 It generated some files
15:48
There is no exe file
15:49
@Learath2 Is it ok?
Avatar
did cmake succeed?
Avatar
Yes, but there is no exe
Avatar
if it did succeed you can just do make -j4 now
Avatar
wait, virtualbox cannot even run teeworlds?
Avatar
well might not be 4
15:50
however many cores you have 😛
15:50
@heinrich5991 it can render most of it, can't do the weird background
15:50
well I'm also using rdp, maybe that's the issue
15:51
virtualboxes native display interface is absolute shit
15:51
yeah even with that it can't do the background
Avatar
It has 2 errors I think but generated the exe files
15:53
b7d452d Libnotify support for linux client (#2099) - ardadem
Avatar
ah, I was supposed to merge that, forgot
Avatar
@Learath2 Works great! thanks!
Avatar
@Learath2 Have you updated the source code in github?
16:07
When I compile this one, it requires Update.
Avatar
@Deleted User I think you should use git to download the source, not some zip
Avatar
DDraceNetwork, a cooperative racing mod of Teeworlds - ddnet/ddnet
16:13
this?
16:14
after the clone, you need to do git submodule init && git submodule update to get ddnet-libs
16:18
I spent an entire day installing windows on a vm 😦
16:20
TIL, Windows 10 comes with sshd now. TIL, RDP actually works great
Avatar
@heinrich5991 can you take a quick look at https://github.com/ddnet/ddnet/pull/2138 just need to check the cmake part
@def- you'll need to build compiler-rt on your osxcross too, but as far as I could test it all works
Avatar
add_c_compiler_flag_if_supported(OUR_FLAGS -mmacosx-version-min=10.7) can we add something like that again?
16:33
or is that done by CMAKE_OSX_DEPLOYMENT_TARGET?
Avatar
I think cmake takes care of all that
Avatar
ok
16:35
@Learath2 what is the idea behind adding rpaths instead of changing them?
Avatar
All bundled executables in macOS assume their frameworks are at ../Frameworks relative to themselves
16:36
which is @loader_path/../Frameworks which XCode adds to all it's built bundles
16:36
it also stops us from needing to modify other frameworks rpaths
Avatar
ah
16:37
no
Avatar
I used install_name_tool because I really couldn't figure out how to use cmakes BUILD_RPATH, I'm a little cmake stunted
Avatar
so the libraries keep the rpath they already have?
16:38
e.g. if you build it with a system sdl, it might have a rpath that points directly there?
Avatar
but that might interfere with loading, no?
16:38
if you keep that path
Avatar
Interfere as in?
Avatar
it might try to load a system SDL2 when we ship one in the bundle
Avatar
System sdl has the same install name
16:41
If you compile with it the executable would still end up with its install name, not the system directory
16:41
But I can double check that
16:41
Dyld works in weird ways
Avatar
`` CMake Warning (dev) at /usr/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to find_package_handle_standard_args (LibNotify) does not match the name of the calling package (Notify). This can lead to problems in calling code that expects find_package result variables (e.g., _FOUND`) to follow a certain pattern. Call Stack (most recent call first): cmake/FindNotify.cmake:4 (find_package_handle_standard_args) CMake...
Avatar
@heinrich5991 now that I think about it that framework we ship is the same thing as the system framework
16:51
That didnt cause rpath issues
Avatar
but we used -change before @Learath2
Avatar
@Learath2
Avatar
No i mean when i built it after the change
Avatar
i can add your bot to server?
Avatar
:I
16:52
sad
Avatar
@heinrich5991 the framework itself indeed has the install name @rpath/SDL2.framework/Versions/A/SDL2 (compatibility version 1.0.0, current version 12.0.0)
16:55
that's what our executable links to
16:56
and in a bundle frameworks always end up in @loader_path/../Frameworks
Avatar
okay, I'm not completely following, but I guess you know what you're doing
Avatar
Which part did you not follow? it might be a sign of me thinking wrong
16:57
but dyld does work quite weirdly
Avatar
okay. @loader_path/../Frameworks is something you observed in other bundles?
16:58
in ours?
Avatar
In other bundles, xcode always adds that to all bundles that link to frameworks
Avatar
48118f6 Fix CMake LibNotify warning (fixes #2141) - def- 602bd27 Merge #2142 - bors[bot]
Avatar
okay
16:59
what is it with the -change, what did that do?
17:00
I guess change the actual dependencies in the executable?
Avatar
We changed the rpath reference to the sdl lib and the hidapi reference in the sdl lib to absolute references starting at our executable_path
17:02
Instead of referring through rpath we referred to the library through a relative path from our executable
17:03
In mach-o linking is done with install names, the library knows its own install name and thats what you link to, the install name of the library, not just a name of the library
Avatar
ah
17:03
(same for linux btw, I think)
17:04
with different nomenclature
Avatar
Is it? I thought you only refer to so's with their name and version
17:04
In mach o the install name can even be an absolute path
Avatar
ah, maybe that's different
17:04
idk
17:04
but it can definitely change the file name it links to
Avatar
Anyway, when you build a framework, you make your install name relative to rpath
Avatar
yea
17:05
makes sense
Avatar
And apple developer guidelines say the frameworks in a bundle are always relative to loader path
17:06
E.g. when a framework links to another
Avatar
yea, sounds good then
Avatar
Is the maintainer of ddnet-git on aur here?
Avatar
@nori what do u need
17:23
ah
17:23
antibot right
17:23
ill fix it now
Avatar
well actually not that
17:24
Could u add libnotify as dependency?
Avatar
oh yeah antibot should work in ddnet-git
17:25
yeah i can
Avatar
@nori done
Avatar
@heinrich5991 why do we use cmake -E in the cpack generator?
Avatar
I'm not sure what the question is @Learath2
17:36
we use it because it does what we want
17:36
create a directory, copy something
Avatar
doesn't cmake have a way to do that without calling cmake again?
Avatar
no, don't think so
Avatar
there is an issue if you link with the system framework turns out
17:39
cmake adds an rpath, we can remove it with CMAKE_INSTALL_SKIP_RPATH but we aren't installing the binary
Avatar
and as always I'm alone
17:49
I'll just learn cmake
Avatar
the problem is that we're not installing
Avatar
cmake is not that dificult
17:51
it would be easier if we were allowed to use modern cmake :)
Avatar
so old cmake is difficult?
Avatar
its more verbose
Avatar
I don't see an easy way to build with different rpaths depending on whether we want to run it from the target folder or want to bundle it
17:52
we could in theory make it dependent from the -DDEV=ON variable, but…
Avatar
aren't we supposed to be installing into the directory before packing it?
Avatar
I think we only do that when using cpack, but that doesn't work for crosscompiling into a bundle
Avatar
are we even using cpack properly? I can't even use cpack
Avatar
the package target is cpack, package_* is our own stuff
Avatar
well that is broken CPack Error: Could not create CPack generator: DMG
Avatar
we don't even test it in CI, I assume cpack for other platforms is broken as well
Avatar
@heinrich5991 okay, can we maybe figure out what rpaths cmake itself decided to add?
18:26
if not I could just ship a script that removes all rpaths, we only want @loader_path/../Frameworks in the final bundle
Avatar
that sounds good
Avatar
otool -l ./DDNet | grep -B1 -A2 "cmd LC_RPATH" | grep path | sed 's/^ *path \(.*\) (offset.*)$/\1/' | xargs -I '{}' install_name_tool -delete_rpath {} ./DDNet how much would you hate this oneliner?
Avatar
a bit
Avatar
and what would you prefer? a python script? or a bash script that does ^^?
Avatar
a python script
19:05
the above also looks like it breaks cross-compilation
19:09
I mean it'll use ${CMAKE_INSTALL_NAME_TOOL} and a new one for OTOOL
Avatar
but I guess it could be fixed
19:09
yea
19:10
I guess it would work as bash as well
19:10
eh I mean as the shell pipeline up there
Avatar
just run that from inside cmake, or just put it in a file?
Avatar
try inside cmake, dunno if it works
19:12
I think shell scripts are fragile and implicit, but if it works, it works
Avatar
I can do python, if you tell me a good way to pass the paths to install_name_tool and otool to python
Avatar
you can check scripts/dmg.py
19:13
I do it there, too (basically: use argparse)
19:14
--dmgtools A B C --hdiutil H
19:14
I thought I had a script to call install_name_tool, too, but I can't find it
19:15
ah, in teeworlds
19:15
scripts/darwin_change_dylib.py @Learath2
19:16
I guess you could argue that I take your hundred byte shell pipeline and transform it to a 70 line python script
Avatar
well shell pipelines are fragile as you say
19:17
oh btw, do you think I should add your GetIntOrDefault patch into ddnet?
Avatar
what do we need it for?
19:18
but if we do, sure? ^^
Avatar
I added the 0.7 protocol files into the source so I can generate the protocol in a namespace
Avatar
ah
19:18
nice
19:18
then sure
Avatar
so I can actually safely unpack the messages
19:18
and have a way to refer to the msg ids without magic constants
Avatar
sounds really good, I like it 🙂
Avatar
@Learath2
20:08
Allowed russian in channels?
Avatar
@Deleted User in #off-topic, I think
Avatar
? GitHub Gist: instantly share code, notes, and snippets.
20:28
python is a language that I'm not that great in, so it'd be nice if you could check this
Avatar
@Learath2 can you give me example output of otool -l?
Avatar
@Learath2 LGTM. variable/function names are snake_case in python, I think
Avatar
In the game we already have highlighted text and sounds, we don't need to bother with notifications.
22:07
8648b1a Don't push notification when active - ardadem 6fe6ff7 Merge #2143 - bors[bot]
Exported 568 message(s)