Bug 1213235 - windows:mingw:win{32|64}/mingw{32|64}-cross-cmake: /usr/bin/mingw{32|64}-cmake are broken links
Summary: windows:mingw:win{32|64}/mingw{32|64}-cross-cmake: /usr/bin/mingw{32|64}-cmak...
Status: RESOLVED FIXED
Alias: None
Product: openSUSE.org
Classification: openSUSE
Component: 3rd party software (show other bugs)
Version: unspecified
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Imnotgivingmy nametoamachine
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-12 07:22 UTC by Imnotgivingmy nametoamachine
Modified: 2023-07-12 14:37 UTC (History)
5 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Imnotgivingmy nametoamachine 2023-07-12 07:22:11 UTC
/usr/bin/mingw32-cmake -> ../lib/mingw32-scripts
/usr/bin/mingw64-cmake -> ../lib/mingw64-scripts

/usr/bin/mingw32-configure -> ../libexec/mingw32-scripts
/usr/bin/mingw32-gdb -> ../libexec/mingw32-scripts
/usr/bin/mingw32-make -> ../libexec/mingw32-scripts
/usr/bin/mingw64-configure -> ../libexec/mingw64-scripts
/usr/bin/mingw64-gdb -> ../libexec/mingw64-scripts
/usr/bin/mingw64-make -> ../libexec/mingw64-scripts

Because /usr/bin/mingw{32|64}-cmake points to the wrong path, they can't be used.
I tried refreshing, updating and reinstalling mingw{32|64}-cross-cmake but the problem persisted.
However linking /usr/bin/mingw64-cmake to ../libexec/mingw64-scripts fixed the problem.
Comment 1 Imnotgivingmy nametoamachine 2023-07-12 07:32:47 UTC
Looks like line 56 is what needs to be updated
https://build.opensuse.org/package/view_file/windows:mingw:win64/mingw64-cross-cmake/mingw64-cross-cmake.spec?expand=1
Comment 2 Imnotgivingmy nametoamachine 2023-07-12 08:42:08 UTC
With LCP's help I learned how to make the one line change, I tested both.
https://build.opensuse.org/request/show/1098315
https://build.opensuse.org/request/show/1098330
Comment 3 Ralf Habacker 2023-07-12 09:20:55 UTC
(In reply to Imnotgivingmy nametoamachine from comment #1)
> Looks like line 56 is what needs to be updated
> https://build.opensuse.org/package/view_file/windows:mingw:win64/mingw64-
> cross-cmake/mingw64-cross-cmake.spec?expand=1

This issue is limited to openSUSE Tumbleweed

$ source  /etc/os-release ; echo $ID
opensuse-tumbleweed

the files are symlinked to ../libexec/mingw32-scripts

$ ls /usr/bin/mingw32-gdb -l
lrwxrwxrwx 1 root root 26 14. Jun 16:34 /usr/bin/mingw32-gdb -> ../libexec/mingw32-scripts

$ ls /usr/libexec/mingw32-scripts
/usr/libexec/mingw32-scripts

On openSUSE Leap the script the link point to is installed in /usr/lib

$ ls /usr/lib/mingw32-scripts
/usr/lib/mingw32-scripts
Comment 4 Imnotgivingmy nametoamachine 2023-07-12 09:42:40 UTC
(In reply to Ralf Habacker from comment #3)
> (In reply to Imnotgivingmy nametoamachine from comment #1)
> > Looks like line 56 is what needs to be updated
> > https://build.opensuse.org/package/view_file/windows:mingw:win64/mingw64-
> > cross-cmake/mingw64-cross-cmake.spec?expand=1
> 
> This issue is limited to openSUSE Tumbleweed
> 
> $ source  /etc/os-release ; echo $ID
> opensuse-tumbleweed
> 
> the files are symlinked to ../libexec/mingw32-scripts
> 
> $ ls /usr/bin/mingw32-gdb -l
> lrwxrwxrwx 1 root root 26 14. Jun 16:34 /usr/bin/mingw32-gdb ->
> ../libexec/mingw32-scripts
> 
> $ ls /usr/libexec/mingw32-scripts
> /usr/libexec/mingw32-scripts
> 
> On openSUSE Leap the script the link point to is installed in /usr/lib
> 
> $ ls /usr/lib/mingw32-scripts
> /usr/lib/mingw32-scripts

Is there a variable I can use instead that will be set to the correct folder depending on the distribution?
Comment 5 Ralf Habacker 2023-07-12 09:46:29 UTC
(In reply to Imnotgivingmy nametoamachine from comment #4)

> Is there a variable I can use instead that will be set to the correct folder
> depending on the distribution?

yes, %{_libexecdir} can be used instead of ../lib
Comment 6 Ralf Habacker 2023-07-12 09:48:16 UTC
(In reply to Ralf Habacker from comment #5)
> (In reply to Imnotgivingmy nametoamachine from comment #4)
> 
> > Is there a variable I can use instead that will be set to the correct folder
> > depending on the distribution?
> 
> yes, %{_libexecdir} can be used instead of ../lib

or 

%_mingw32_create_macro_links %{buildroot}%{_bindir}/mingw32-cmake

and 

%_mingw64_create_macro_links %{buildroot}%{_bindir}/mingw64-cmake
Comment 7 Imnotgivingmy nametoamachine 2023-07-12 09:50:04 UTC
(In reply to Ralf Habacker from comment #6)
> (In reply to Ralf Habacker from comment #5)
> > (In reply to Imnotgivingmy nametoamachine from comment #4)
> > 
> > > Is there a variable I can use instead that will be set to the correct folder
> > > depending on the distribution?
> > 
> > yes, %{_libexecdir} can be used instead of ../lib
> 
> or 
> 
> %_mingw32_create_macro_links %{buildroot}%{_bindir}/mingw32-cmake
> 
> and 
> 
> %_mingw64_create_macro_links %{buildroot}%{_bindir}/mingw64-cmake

Thanks, I'll test these and make a new request.
Comment 8 Imnotgivingmy nametoamachine 2023-07-12 11:10:49 UTC
Made a new request for mingw64-cross-cmake https://build.opensuse.org/request/show/1098348

If this is correct I'll make corrected request for mingw32-cross-cmake too and for another package I just found has the same problem.
Comment 9 Imnotgivingmy nametoamachine 2023-07-12 14:37:15 UTC
fixed with
https://build.opensuse.org/request/show/1098364
https://build.opensuse.org/request/show/1098370
https://build.opensuse.org/request/show/1098371

Thanks for your patience and the much needed hand holding, it was a very valuable experience and I hope to contribute more in the future, hopefully without needing much less intervention now with some experience, I'll try to find and read related wiki pages about contributing.