|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
gnofract4d will not launch
Hello everyone. This is my second post ever. I am having a bit of trouble with the package gnofract4d. This is not a big deal, I can live without this application. However as I am new to openBSD I thought troubleshooting this could be a good learning experience. As package managers go I am familiar with dnf, apt, and Slackware's installpkg. I have installed gnofract4d using the pkg_add utility. However when I launch the program from a terminal I get the following output shown below
Puffy-Chicken$ gnofract4d A fatal error occurred: Error reported by C compiler:sh: gcc: not found Traceback (most recent call last): File "/usr/local/bin/gnofract4d", line 152, in <module> main(sys.argv[1:]) File "/usr/local/bin/gnofract4d", line 81, in main gtkmain(opts) File "/usr/local/bin/gnofract4d", line 128, in gtkmain mainWindow = main_window.MainWindow() File "/usr/local/lib/python2.7/site-packages/fract4dgui/main_window.py", line 69, in __init__ self.f = gtkfractal.T(self.compiler,self) File "/usr/local/lib/python2.7/site-packages/fract4dgui/gtkfractal.py", line 447, in __init__ Hidden.__init__(self,comp,width,height) File "/usr/local/lib/python2.7/site-packages/fract4dgui/gtkfractal.py", line 73, in __init__ self.try_init_fractal() File "/usr/local/lib/python2.7/site-packages/fract4dgui/gtkfractal.py", line 88, in try_init_fractal self.f.compile() File "/usr/local/lib/python2.7/site-packages/fract4d/fractal.py", line 624, in compile self.compiler_options) File "/usr/local/lib/python2.7/site-packages/fract4d/fc.py", line 278, in compile_all outputfile = os.path.abspath(self.generate_code(t, cg)) File "/usr/local/lib/python2.7/site-packages/fract4d/fc.py", line 430, in generate_code "Error reported by C compiler:%s" % output) fract4d.fracttypes.TranslationError: Error reported by C compiler:sh: gcc: not found I have installed gcc choosing option 1 which installs version 8.4. I also tried version 11.2. Neither however has any impact, I still get the exact same error. Have to say I am bit confused. I thought these were binaries and gcc is a compiler right? Why would it be a dependency? Anyway any help or pointers in the right direction would be greatly appreciated. |
|
|||
Erg... Ok so basically I am out of luck. Even if I went old school on this and downloaded the source and tried make && make install it would still fail as it is looking for gcc, not clang.
|
|
|||
Thanks. Yes I too installed the gcc-8.4.0 version. I created the link but that does not appear to alter the result for me. Am I missing something? Bit confused, would not /usr/local/bin already be in the path?
|
|
||||
Either you did not copy or link the "egcc" file as "gcc" into a directory in your $PATH, or, you are using a shell which needs to update its executable hash table, such as bash or tcsh.
Check the directories listed in $PATH with $ echo $PATH , confirm the file exists in the intended directory with ls(1), and if needed, issue $ hash gcc or $ rehash , or restart your shell.
|
|
|||
jggimi you are awesome! Yes I got it. Lessons learned. I got gnofract4d to launch.
|
|
||||
Hmmm. On clang architectures (such as amd64), a working "gcc" is needed in order to get the application running. Once running, you can change the compiler in Edit...Preferences to egcc or to cc or clang. Then the "gcc" executable is no longer needed. But on gcc architectures (such as sparc64), there's a working "gcc" and no circumvention is needed.
I can differentiate between these architectures with the Ports infrastructure's $GCC4_ARCHS and $CLANG_ARCHS ... the struggle will be applying a patch only when the package build is on a clang architecture. |
|
||||
I've got it! The patches will only be applied on clang archs.
For anyone who is interested in how ... I used the bsd.port.arch.mk $PROPERTIES test, which is described in the bsd.port.mk(5) man page, and set a "clang-only" patch directory that will be ignored on other (gcc) architectures: Code:
.include <bsd.port.arch.mk> .if ${PROPERTIES:Mclang} PATCHDIR = patches-clang .endif |
|
|||
jggimi, I really appreciate the effort you have put into this. The program is just a simple fun fractal generator. I have used it for about 14 odd years to make random wallpaper for whatever window manager I am using, usually openbox. What you are doing I contemplated. I thought, just edit the code to point to the desired compiler. However the most I have ever done is editing slackbuild scripts to use newer source code or to use extra dependencies or options. What you are doing I am sorry to say is a bit over my head. Thanks again, much appreciated.
|
|
||||
It was just an interesting exercise for me, having never heard of the application before.
The third party packages you install on OpenBSD are built through OpenBSD's Ports Tree. Each "leaf" of the tree contains a set of instructions to build packages -- install dependencies, download source code, build, and package the application. I've prepared an updated "leaf" for the Ports Tree -- the port that builds the gnofract4d package. My port -- or leaf -- contains the instructions to download and build a package from the most recent release of the application. The unique change for this update is to leave "gcc" hardcoded as the default compiler on architectures that have a "gcc" compiler, and switch this to "cc" as the hardcoded default compiler that have a "cc" clang compiler. The update may not be acceptable to the OpenBSD Project as-is. This patch-by-architecture mechanism is not used on any other port in the tree. If not accepted, it may be sent back to me with advice for rework. Here's my post to the ports@ mailing list, containing a patch in unified diff(1) format to the graphics/gnofract4d port -- or "leaf" of the Ports Tree, removing and replacing lines in the instructions for building and packaging the port. There are revisions to the Makefile (instructions), distinfo (checksums for the source code), pkg/PLIST (packing list for the package), and 4 new patch files to switch "gcc" to "cc" when the package is being built on one of the clang architectures. https://marc.info/?l=openbsd-ports&m...4142328973&w=2 |
|
||||
The port is in active review, with several changes recommended. If it gets committed, packages of it will be available with 7.1-release. I might be able to "backport" it to build packages for 7.0-release. Success will depend on the changes since 7.0 that were made to how the Ports Tree manages python applications like this one. (The gory details are in the python-module(5) man page.)
|
|
||||
It's been committed. The major change was to make the hardcoded "gcc" convert to "cc" on all architectures unconditionally; all of them have a /usr/bin/cc executable.
Packages will be available shortly for -current users as the cycle of snapshot packages are built for most architectures. And of course, it will be available for 7.1-release. I've tested the port on a 7.0-release/amd64 system. No changes were needed to build the package, install, and run. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
occasional application crashes, usually at launch | brudan | OpenBSD General | 7 | 5th April 2019 02:16 PM |
Changes to dates of launch of new releases? | betweendayandnight | OpenBSD General | 1 | 12th August 2016 10:28 PM |
Tomorrow is World IPv6 Launch Day | J65nko | News | 1 | 5th June 2012 04:21 PM |
World IPv6 Launch on 6 June | J65nko | News | 0 | 19th January 2012 11:57 PM |
How launch script or command from icewm? | aleunix | General software and network | 8 | 8th June 2008 09:12 PM |