[Solved] fixes/32 Compile Error - 'obj/hardwareprofile/distros/__init__.py': No such file or directory

For discussion of topics specific to MythTV on linux
Post Reply
Vaska
Junior
Posts: 53
Joined: Fri Sep 01, 2017 11:09 pm
Canada

[Solved] fixes/32 Compile Error - 'obj/hardwareprofile/distros/__init__.py': No such file or directory

Post by Vaska » Fri Nov 18, 2022 1:53 am

Hi - I'm recompiling fixes/32 after pulling in the last few GIT updates, but now I get this error when I try to compile:

Code: Select all

make[2]: Entering directory '/var/work/Install/MythTV/GIT-32/mythtv/mythtv/programs/scripts'
cp -f hardwareprofile/distros/__init__.py obj/hardwareprofile/distros/__init__.py
cp: cannot create regular file 'obj/hardwareprofile/distros/__init__.py': No such file or directory
make[2]: *** [Makefile:737: obj/hardwareprofile/distros/__init__.py] Error 1
make[2]: Leaving directory '/var/work/Install/MythTV/GIT-32/mythtv/mythtv/programs/scripts'
make[1]: *** [Makefile:504: sub-scripts-install_subtargets] Error 2
make[1]: Leaving directory '/var/work/Install/MythTV/GIT-32/mythtv/mythtv/programs'
make: *** [Makefile:75: programs_install] Error 2
This was my configure command:

Code: Select all

./configure --with-bindings=perl,python,php --enable-libmp3lame --disable-libxvid --enable-nonfree --disable-distcc --disable-libx264 --disable-libx265 --disable-audio-pulseoutput --disable-sdl --disable-audio-jack
I've never seen this before. Am I missing a library, or is there something else I should add to my configure command? I've been building from source like this with the same configure command for over a year and haven't had this issue before.

I'm on an up to date Gentoo system and all the packages are from stable branch other than sys-kernel/gentoo-source and few Kodi add-ons.

blm-ubunet
Senior
Posts: 218
Joined: Sun Jun 15, 2014 1:08 am
Cambodia

Re: fixes/32 Compile Error - 'obj/hardwareprofile/distros/__init__.py': No such file or directory

Post by blm-ubunet » Sat Nov 19, 2022 5:29 am

This is also a bit of a laugh..
./configure --previous

master branch here.
/programs folder compiled okay here without (before) running configure.

And seems to compile okay after the below process (I have to modify configure before can use)..

In /mythtv/
make clean
make distclean
(then repeat those 2 cmds in /mythplugins/ folder

In /mythtv/
./configure --some_options
make
make install
cd ../mythplugins
./configure --some_options
make
make install

It is actually better to run make clean distclean before git pull.
There's some other better clean up cmd that I forgot.

Vaska
Junior
Posts: 53
Joined: Fri Sep 01, 2017 11:09 pm
Canada

Re: fixes/32 Compile Error - 'obj/hardwareprofile/distros/__init__.py': No such file or directory

Post by Vaska » Sat Nov 19, 2022 1:46 pm

I'm not sure what you're getting at with

Code: Select all

This is also a bit of a laugh..
./configure --previous
I've always run after "make clean" & "make distclean" before I compile, but I do run both of those after "git pull" but I'll try it in the other order if you think it will help.

blm-ubunet
Senior
Posts: 218
Joined: Sun Jun 15, 2014 1:08 am
Cambodia

Re: fixes/32 Compile Error - 'obj/hardwareprofile/distros/__init__.py': No such file or directory

Post by blm-ubunet » Sat Nov 19, 2022 8:58 pm

Configure in git master is not right..
--previous was a valid cmd option & now it is complete nonsense filling shell with repeated text in endless loop....

Note I was compiling git master.

It will not help now. It's only a minor point anyway.
There can be file/folder structure that is changed by the git pull & then the make clean etc does not always work 100%.
But there is a simple git repo clean up cmd, I just forget what it is.

I would browse the github repo branch & have look to see if files are renamed or folders moved. Can then do some surgery on your clone.

User avatar
paulh
Developer
Posts: 789
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: fixes/32 Compile Error - 'obj/hardwareprofile/distros/__init__.py': No such file or directory

Post by paulh » Mon Nov 21, 2022 1:14 pm

That looks like a problem with your python or git install to me. Not sure what though. File permissions possibly? Does the file /var/work/Install/MythTV/GIT-32/mythtv/mythtv/programs/scripts/hardwareprofile/distros/__init__.py exist? What about /var/work/Install/MythTV/GIT-32/mythtv/mythtv/programs/scripts/obj/hardwareprofile/distros/__init__.py

User avatar
kmdewaal
Developer
Posts: 461
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: fixes/32 Compile Error - 'obj/hardwareprofile/distros/__init__.py': No such file or directory

Post by kmdewaal » Mon Nov 21, 2022 10:17 pm

I get now sometimes the same error on my laptop after upgrading to Fedora 37.

User avatar
kmdewaal
Developer
Posts: 461
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: fixes/32 Compile Error - 'obj/hardwareprofile/distros/__init__.py': No such file or directory

Post by kmdewaal » Tue Nov 22, 2022 10:26 pm

The error can be reproduced as follows.

Start with a master source tree fresh from "git clone https//github.com/MythTV/mythtv" and then:

Code: Select all

configure --prefix=/my_target_directory --compile-type=debug
make
this builds OK.

Then do this:

Code: Select all

make clean
make
and then the build fails with this error:

Code: Select all

cp -f hardwareprofile/distros/__init__.py obj/hardwareprofile/distros/__init__.py
cp: cannot create regular file 'obj/hardwareprofile/distros/__init__.py': No such file or directory
make[2]: *** [Makefile:503: obj/hardwareprofile/distros/__init__.py] Error 1
make[2]: Leaving directory '/home/klaas/mma-dev/mythtv/mythtv/programs/scripts'
make[1]: *** [Makefile:492: sub-scripts-make_first] Error 2
make[1]: *** Waiting for unfinished jobs....
As I understand it, the Makefile is created by qmake from a scripts.pro file.
What goes wrong is that the "cp" command tries to copy a file into directory obj/hardwareprofile/distros but there is no distros directory in obj/hardwareprofile.
After a "make distclean" and a new "configure" the make succeeds again.

The nearest related commit I could find is fe6a417adc419b21483da06d2e9ec02a552c1ed5 "Copy files to the right place when updating python executable." but that is from almost two years ago.

User avatar
kmdewaal
Developer
Posts: 461
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: fixes/32 Compile Error - 'obj/hardwareprofile/distros/__init__.py': No such file or directory

Post by kmdewaal » Fri Nov 25, 2022 7:18 pm

The problem disappears when commit fe6a417adc419b21483da06d2e9ec02a552c1ed5 is reverted.
However, the commit text describes that it solves a problem in copying Python executables so it cannot just be reverted in master.

@linuxdude42 can you please have a look at this?

Thanks,
Klaas.

User avatar
hampton
Developer
Posts: 10
Joined: Wed Apr 22, 2020 3:54 pm
United States of America

Re: fixes/32 Compile Error - 'obj/hardwareprofile/distros/__init__.py': No such file or directory

Post by hampton » Mon Nov 28, 2022 10:50 pm

Thanks for the head's up, Klaas.I just fixed this problem in both master and fixes/32.

master: 00e4fc531cb87e117e035f0e967b79847c9982f1
fixes-32: f358f305c36fe6d52915c74b55ba17e84855ee8e

Post Reply