Fix compile error with ldc-1.40.0 on OSX#14
Fix compile error with ldc-1.40.0 on OSX#14elementgreen merged 1 commit intoKymorphia:mainfrom gizmomogwai:main
Conversation
|
I do not have ldc 1.40 here so will soon have an lxc container with latest Fedora to test this PR... |
|
I've tested this PR on a Fedora 41 LXC container with manually built LDC 1.40. It works as expected. No issues. So what is really the issue, and on which OS? |
|
@gizmomogwai It seems like there shouldn't be an issue with assigning to the I do see an existing bug with the line of code you proposed to change though. I think instead of this: version (OSX) lib = lib.buildPath(basePath, lib);It should be this: version (OSX) lib = buildPath(basePath, lib);Could you try that and provide more details if you are still getting a compilation error? |
|
my apologies, was not the best pull request i have to admit. the error i am encountering (e.g. when running when running / compiling from sha c34a5b7 on OSX (as you suspected). |
|
not sure why |
|
sorry @elementgreen i get the same compilation error with your proposal: |
|
one additional thing that i can recommend is to use the install.sh of dlang.org to put several versions of the compiler to ~/dlang ... no need for any containers or anything. still would not expose the problem, as the assignment is only done for osx. one way to reproduce it is to just assign another string to lib for every version. e.g. |
|
Thanks for posting the compiler error message. I can now see what the issue is. libs is an immutable array of strings, so lib would thus be immutable. Can you update your PR to include the fix to the lib assignment as well? As it is, it would end up building a path that is |
|
I am indeed happy to see an OSX user giving giddy a try. Please either file issues that you encounter, here, or ask any questions on our forum. |
|
actually i am quite happy to see this just working gtk binding. cross platform uis is one of the areas where dlang especially does not shine. i hope the change is now as you would expect it to be, interestingly i printed the old and new values (in case of osx now, and for me they are all the same, so i wonder if that is required at all or for which special case this is required). i also now tried to remove the version osx line completely and that works for me. i do have a little strange setup, that i have to set DYLD_LIBRARY_PATH to my homebrew folder for gtk4 libs though (e.g. |
|
This change builds successfully on Fedora with gdc, ldc and dmd so I am fine with merging this as long as @gizmomogwai is happy with it on OSX. |
No description provided.