Bug 1837317 - fatal error, no such file or directory: 'fract4d/c/pf.h'
Summary: fatal error, no such file or directory: 'fract4d/c/pf.h'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gnofract4d
Version: 32
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1840456 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-19 09:12 UTC by J. Randall Owens
Modified: 2020-05-28 04:14 UTC (History)
3 users (show)

Fixed In Version: gnofract4d-4.1-2.fc31 gnofract4d-4.1-2.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-28 01:59:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description J. Randall Owens 2020-05-19 09:12:20 UTC
Description of problem:
After a fresh install of gnofract4d-4.1-1.fc32.x86_64 on a recently upgraded F32, I try to start it first from the launcher menu, then from terminal window for more detail. Either way, it doesn't start.

Version-Release number of selected component (if applicable):
gnofract4d-4.1-1.fc32.x86_64

How reproducible:
unknown

Steps to Reproduce:
1. dnf install gnofract4d
2. rehash (I'm a tcsh user, I don't think bash will need it)
3. gnofract4d

Actual results:
A fatal error occurred:
        [Errno 2] No such file or directory: 'fract4d/c/pf.h'


Traceback (most recent call last):
  File "/usr/bin/gnofract4d", line 93, in <module>
    main(sys.argv[1:])
  File "/usr/bin/gnofract4d", line 39, in main
    gtkmain(userConfig, opts)
  File "/usr/bin/gnofract4d", line 64, in gtkmain
    mainWindow = main_window.MainWindow(userConfig)
  File "/usr/lib64/python3.8/site-packages/fract4dgui/main_window.py", line 85, in __init__
    self.f = gtkfractal.T(self.compiler, self)
  File "/usr/lib64/python3.8/site-packages/fract4dgui/gtkfractal.py", line 461, in __init__
    Hidden.__init__(self, comp, width, height)
  File "/usr/lib64/python3.8/site-packages/fract4dgui/gtkfractal.py", line 71, in __init__
    self.try_init_fractal()
  File "/usr/lib64/python3.8/site-packages/fract4dgui/gtkfractal.py", line 86, in try_init_fractal
    self.f.compile()
  File "/usr/lib64/python3.8/site-packages/fract4d/fractal.py", line 613, in compile
    outputfile = self.compiler.compile_all(
  File "/usr/lib64/python3.8/site-packages/fract4d_compiler/fc.py", line 255, in compile_all
    self.compile(formula, options)
  File "/usr/lib64/python3.8/site-packages/fract4d_compiler/fc.py", line 388, in compile
    cg = codegen.T(ir.symbols, options)
  File "/usr/lib64/python3.8/site-packages/fract4d_compiler/codegen.py", line 242, in __init__
    self.pf_header = open('fract4d/c/pf.h').read()
FileNotFoundError: [Errno 2] No such file or directory: 'fract4d/c/pf.h'
Exit 1

Expected results:
I guess some sort of window that shows a Mandelbrot set, or something like that, eventually, maybe after selecting variables or something.

Additional info:
The only pf.h I find on my system is /usr/src/kernels/5.6.12-300.fc32.x86_64/include/config/kvm/async/pf.h, which wouldn't seem like what this should be looking for in a fract4d/c/ directory.
I know very little about Python, and even less about debugging it, so if further debugging is needed, I'll need some handholding.

Comment 1 Jerry James 2020-05-19 15:10:08 UTC
This must be related to the new fract4d_compiler feature.  It's interesting that I can start gnofract4d without encountering this error.  I wonder why it is biting you?  Still the issue is clear: some more files need to be installed.  I'll work it out and do a new build.  Thanks for the report!  Watch this bug for information about an update.

Comment 2 Fedora Update System 2020-05-19 17:16:49 UTC
FEDORA-2020-498b5e8e76 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-498b5e8e76

Comment 3 Fedora Update System 2020-05-19 17:17:02 UTC
FEDORA-2020-97a20e273f has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-97a20e273f

Comment 4 Need Real Name 2020-05-19 18:06:08 UTC
Same error here:

$ gnofract4d 
A fatal error occurred:
	[Errno 2] No such file or directory: 'fract4d/c/pf.h'


Traceback (most recent call last):
  File "/usr/bin/gnofract4d", line 93, in <module>
    main(sys.argv[1:])
  File "/usr/bin/gnofract4d", line 39, in main
    gtkmain(userConfig, opts)
  File "/usr/bin/gnofract4d", line 64, in gtkmain
    mainWindow = main_window.MainWindow(userConfig)
  File "/usr/lib64/python3.8/site-packages/fract4dgui/main_window.py", line 85, in __init__
    self.f = gtkfractal.T(self.compiler, self)
  File "/usr/lib64/python3.8/site-packages/fract4dgui/gtkfractal.py", line 461, in __init__
    Hidden.__init__(self, comp, width, height)
  File "/usr/lib64/python3.8/site-packages/fract4dgui/gtkfractal.py", line 71, in __init__
    self.try_init_fractal()
  File "/usr/lib64/python3.8/site-packages/fract4dgui/gtkfractal.py", line 86, in try_init_fractal
    self.f.compile()
  File "/usr/lib64/python3.8/site-packages/fract4d/fractal.py", line 613, in compile
    outputfile = self.compiler.compile_all(
  File "/usr/lib64/python3.8/site-packages/fract4d_compiler/fc.py", line 255, in compile_all
    self.compile(formula, options)
  File "/usr/lib64/python3.8/site-packages/fract4d_compiler/fc.py", line 388, in compile
    cg = codegen.T(ir.symbols, options)
  File "/usr/lib64/python3.8/site-packages/fract4d_compiler/codegen.py", line 242, in __init__
    self.pf_header = open('fract4d/c/pf.h').read()
FileNotFoundError: [Errno 2] No such file or directory: 'fract4d/c/pf.h'



May I suggest the following --

I would use docker for "smoke testing" this package (and actually for every UI package in Fedora, particularly for python-UI packages):


  docker run --name=fedora fedora:32 /bin/bash -c "dnf -y install xorg-x11-server-Xvfb gtk3 gnofract4d; xvfb-run gnofract4d"


That one-line docker command will pull and run the stock fedora:32 image, then install just enough X server to get you going, and finally run gnofract4d in the Xvfb server, producing the error output.
 
[my quick test also indicated the need for installing package 'gtk3' to get gnofract4d working, which suggests it is missing from the prereqs for gnofract4d.]




This docker-based approach guarantees a 'clean' system for testing, and only takes a few minutes to run. Furthermore, if you want to inspect the filesystem or do other testing after the 'docker run' command completes, you can follow up with this:

  docker commit fedora fedora/test_gnofract/001
  docker run -it --name=gnofract_test fedora/test_gnofract/001 /bin/bash

... and that will give you a root prompt in the image and you can poke around.


Thanks for supporting Fedora. If you aren't already familiar with docker for this kind of testing ... it is very efficient and can be added to automated tests.

Comment 5 Need Real Name 2020-05-19 19:23:58 UTC
This is working, for me, now:

  sudo dnf -y install https://kojipkgs.fedoraproject.org//packages/gnofract4d/4.1/2.fc32/x86_64/gnofract4d-4.1-2.fc32.x86_64.rpm
  gnofract4d


Also, this command runs with no stack trace produced:

  docker run --name=fedora2 fedora:32 /bin/bash -c "dnf -y install xorg-x11-server-Xvfb gtk3 ; dnf -y install https://kojipkgs.fedoraproject.org/packages/gnofract4d/4.1/2.fc32/x86_64/gnofract4d-4.1-2.fc32.x86_64.rpm ; xvfb-run gnofract4d"


Looks like it might be fixed with your update.

Comment 6 Need Real Name 2020-05-19 20:11:03 UTC
One more comment -- the overall docker debug flow might work like this (for anyone seeing this bug that is not that experienced with docker):


Start a container from a known state (stock fedora:32), install Xvfb and prereqs, install an rpm for an X application package via url, and finally use Xvfb to run the application in X:

  docker run --name=fedora_test_container fedora:32 /bin/bash -c "dnf -y install xorg-x11-server-Xvfb gtk3 ; dnf -y install https://kojipkgs.fedoraproject.org/packages/gnofract4d/4.1/2.fc32/x86_64/gnofract4d-4.1-2.fc32.x86_64.rpm ; xvfb-run gnofract4d"


Next, assume that the command was successful and the app you started (in this case, gnofract4d) appears to be running - perhaps you want to interact with it for further testing.
From a separate terminal -- install x11vnc to access Xvfb in the running container:

  docker exec fedora_test_container dnf -y install x11vnc
  docker exec fedora_test_container x11vnc -safer -once -nopw -auth $(ls -d /tmp/xvfb*/*) -ncache_cr -geometry 640x480 -display :99


Lastly, from yet another terminal, run vncviewer on your local system to view the app in the container's Xvfb system:

  vncviewer $(docker inspect -f '{{ .NetworkSettings.IPAddress }}' fedora_test_container):0


That last command will get the ip address of the container 'automatically' for use with vncviewer.


There are many ways to skin the testing cat, but I just wanted to illustrate a simple means of using fedora docker images for 'clean room' testing. As you can see, the above is just FOUR commands to get a clean Fedora environment sufficient for testing an X application. Anyone reading this can try those steps out, right now; I just tested them and it took about 4 minutes, start-to-finish.

Comment 7 Jerry James 2020-05-19 20:54:56 UTC
The real problem here is that I maintain a couple hundred packages, and I don't even use this one.  I try to keep it building, but if something breaks I am unlikely to notice until somebody tells me.  If one of you who actually use it would like to maintain it, please let me know.  Even if you are not currently a Fedora packager, that is no obstacle.  I can sponsor you into the packager group and show you what to do.  Let me know.

Comment 8 Need Real Name 2020-05-20 02:30:08 UTC
Hey, I totally understand, and your contribution is immensely appreciated, thank you. I will consider your suggestion about package maintenance ...

Comment 9 Fedora Update System 2020-05-20 05:40:41 UTC
FEDORA-2020-498b5e8e76 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-498b5e8e76`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-498b5e8e76

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2020-05-20 05:48:54 UTC
FEDORA-2020-97a20e273f has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-97a20e273f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-97a20e273f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Jerry James 2020-05-27 01:27:59 UTC
*** Bug 1840456 has been marked as a duplicate of this bug. ***

Comment 12 Fedora Update System 2020-05-28 01:59:50 UTC
FEDORA-2020-498b5e8e76 has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2020-05-28 04:14:23 UTC
FEDORA-2020-97a20e273f has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.