0

I have this spec file for building a CodeLite package and on Fedora 25 it builds fine. But on Fedora 24 instances of the Open Build Service (OBS) it fails giving the error

[   93s] -- SQLITE3_LIBRARY: /usr/lib64/libsqlite3.so
[   93s] -- BUILD_DIRECTORY is set to /home/abuild/rpmbuild/BUILD/codelite-10.0/build_release
[   93s] -- OS name Linux
[   93s] which: no wx-config in (/usr/libexec/wxGTK31/:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/abuild/rpmbuild)
[   93s] CMake Error at CMakeLists.txt:128 (message):
[   93s]   
[   93s] 
[   93s]   No functional wx_config script was found in your PATH.
[   93s] 
[   93s]   Is the wxWidgets development package installed?
[   93s] 
[   93s] 
[   93s] -- Configuring incomplete, errors occurred!
[   93s] See also "/home/abuild/rpmbuild/BUILD/codelite-10.0/build_release/CMakeFiles/CMakeOutput.log".
[   93s] error: Bad exit status from /var/tmp/rpm-tmp.85K6gn (%build)
[   93s] 
[   93s] 

I tried to fix this very error on L74-L75 of my spec file using a symlink. This fix works for the Fedora 25 build instance on the OBS, but not Fedora 24, oddly. Are there any better solutions that work for both distribution versions?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
Josh Pinto
  • 3,483
  • 15
  • 52
  • 87

1 Answers1

2

/usr/bin/wx-config is a symlink because of the "alternatives" system — it happens that Fedora has both wxGTK and wxGTK3, both of which can provide wx-config. If you have either wxGTK-devel or wxGTK3-devel installed on your system, /usr/bin/wx-config should exist and point to /etc/alternatives/wx-config, which in turn should point to the appropriate /usr/libexec/(whatever). (If you have both installed, wxGTK3-devel should take precedence.)

You have BuildRequires: wxGTK3-devel in your specfile, so this should Just Work. You shouldn't have to (and, basically, therefore just shouldn't) need to make the symlink yourself. However, it appears there was a packaging bug (bugzilla #1077718) in the version of wxGTK3 shipped with Fedora 24. This was fixed in an update, but it looks like OBS doesn't have an option to include updates in your buildroot, so unfortunately you'll need to find a workaround for that.

mattdm
  • 39,535
  • 18
  • 99
  • 133
  • Ya it seems specific to the OBS. Building in Copr without the symlink goes without a problem, dito for building it with rpmbuild. – Josh Pinto Jan 02 '17 at 18:30
  • Is OBS actually _installing_ `wxGTK3-devel`? Maybe it isn't running the post-script? – mattdm Jan 02 '17 at 18:36
  • Looks like it to me I copy-pasted the log file to http://paste2.org/Ujv252hy. – Josh Pinto Jan 02 '17 at 18:40
  • Aha! I see that it's installing `wxGTK3-3.0.2-19.fc24`. From the changelog, I see the comment *"Fix alternatives implementation"* at release ***3.0.2-23*** (references [bug #1077718](https://bugzilla.redhat.com/show_bug.cgi?id=1077718)). Can you make OBS include updates in its build environment? – mattdm Jan 02 '17 at 18:50
  • Afraid not, unless I manually build them myself. Well this is going to be a delight. I'll have to build a later wxGTK3 in my OBS project. – Josh Pinto Jan 02 '17 at 18:51