View previous topic :: View next topic |
Author |
Message |
binro l33t
Joined: 06 May 2005 Posts: 724 Location: Bangkok, Thailand
|
Posted: Sat Jul 17, 2021 11:45 am Post subject: NetworkManager-1.32.2 compile error |
|
|
Building the latest NetworkManager gives me:
Code: |
"/usr/bin/python3.9" /var/tmp/portage/net-misc/networkmanager-1.32.2/work/NetworkManager-1.32.2/tools/generate-docs-nm-settings-docs-merge.py --only-from-first man/nm-settings-docs-nmcli.xml /var/tmp/portage/net-misc/networkmanager-1.32.2/work/NetworkManager-1.32.2/src/nmcli/generate-docs-nm-settings-nmcli.xml /var/tmp/portage/net-misc/networkmanager-1.32.2/work/NetworkManager-1.32.2/src/libnm-client-impl/nm-property-infos-nmcli.xml src/libnm-client-impl/nm-settings-docs-gir.xml
"/usr/bin/python3.9" /var/tmp/portage/net-misc/networkmanager-1.32.2/work/NetworkManager-1.32.2/tools/generate-docs-nm-settings-docs-merge.py src/libnmc-setting/settings-docs-input.xml /var/tmp/portage/net-misc/networkmanager-1.32.2/work/NetworkManager-1.32.2/src/libnm-client-impl/nm-property-infos-nmcli.xml src/libnm-client-impl/nm-settings-docs-gir.xml
Traceback (most recent call last):
File "/usr/lib/python3.9/xml/etree/ElementTree.py", line 762, in _get_writer
write = file_or_filename.write
AttributeError: 'str' object has no attribute 'write'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/tmp/portage/net-misc/networkmanager-1.32.2/work/NetworkManager-1.32.2/tools/generate-docs-nm-settings-docs-merge.py", line 175, in <module>
ET.ElementTree(root_node).write(gl_output_xml_file)
File "/usr/lib/python3.9/xml/etree/ElementTree.py", line 732, in write
with _get_writer(file_or_filename, enc_lower) as write:
File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__
return next(self.gen)
File "/usr/lib/python3.9/xml/etree/ElementTree.py", line 768, in _get_writer
file = open(file_or_filename, "w", encoding=encoding,
FileNotFoundError: [Errno 2] No such file or directory: 'src/libnmc-setting/settings-docs-input.xml'
make[2]: *** [Makefile:21207: src/libnmc-setting/settings-docs-input.xml] Error 1
make[2]: Leaving directory '/var/tmp/portage/net-misc/networkmanager-1.32.2/work/NetworkManager-1.32.2-abi_x86_64.amd64'
make[1]: *** [Makefile:18482: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-misc/networkmanager-1.32.2/work/NetworkManager-1.32.2-abi_x86_64.amd64'
make: *** [Makefile:8513: all] Error 2
|
There is no elementtree package so i cannot upgrade that. How do I proceed?
Thanks
Robin _________________ "Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling |
|
Back to top |
|
|
binro l33t
Joined: 06 May 2005 Posts: 724 Location: Bangkok, Thailand
|
Posted: Sun Jul 18, 2021 2:50 pm Post subject: |
|
|
I reinstalled version 1.30.4 and that worked, so it's not a problem with, say, Python 3.9 but a problem with NetworkManager itself. ElementTree.py is a part of dev-lang/python and the statement that fails is the same in other Python versions going back to at least 3.2. So I am guessing an included module has gone wrong? _________________ "Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21630
|
Posted: Sun Jul 18, 2021 4:25 pm Post subject: |
|
|
As I read this code, which I have never looked at before today, NetworkManager passed a string to ElementTree.write for the parameter file_or_filename. Python first tried to treat it as a file, and failed. It then tried to treat it as a filename, and found no file by that name. In the version of NetworkManager that works, does the named file exist at the right path? Is this a generated file or a shipped file? Does NetworkManager call ElementTree.write from this build script? |
|
Back to top |
|
|
binro l33t
Joined: 06 May 2005 Posts: 724 Location: Bangkok, Thailand
|
Posted: Mon Jul 19, 2021 2:59 pm Post subject: |
|
|
I have just built NM 1.32.2 on a different system and it worked, which implies something is missing on the other system. I find that a bit strange since I cloned that system from the one where the build works. Looking in /var/tmp/portage/net-misc/... there is not a directory /var/tmp/portage/net-misc/networkmanager-1.32.2/work/NetworkManager-1.32.2-abi_x86_64.amd64/src/libnmc-setting/; there is one /var/tmp/portage/net-misc/networkmanager-1.32.2/work/NetworkManager-1.32.2-src/libnmc-setting. I don't know the significance of this!
Thanks _________________ "Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21630
|
Posted: Mon Jul 19, 2021 3:11 pm Post subject: |
|
|
Is one of the systems amd64 multilib and the other not? |
|
Back to top |
|
|
binro l33t
Joined: 06 May 2005 Posts: 724 Location: Bangkok, Thailand
|
Posted: Mon Jul 19, 2021 4:02 pm Post subject: |
|
|
Hu wrote: | Is one of the systems amd64 multilib and the other not? |
No, as I said, one is cloned from the other. _________________ "Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21630
|
Posted: Mon Jul 19, 2021 5:36 pm Post subject: |
|
|
Clones can diverge. Some people clone a reference system, then modify the clone to serve a different purpose, which is why I asked. |
|
Back to top |
|
|
Nsane457 n00b
Joined: 25 Nov 2004 Posts: 45
|
Posted: Tue Jul 20, 2021 6:32 pm Post subject: |
|
|
It appears to be a parallel make bug. Building with MAKEOPTS=-j1 works for me. |
|
Back to top |
|
|
binro l33t
Joined: 06 May 2005 Posts: 724 Location: Bangkok, Thailand
|
Posted: Mon Aug 02, 2021 1:09 pm Post subject: |
|
|
Nsane457 wrote: | It appears to be a parallel make bug. Building with MAKEOPTS=-j1 works for me. | That's interesting. I was looking at this again last night because net-misc/networkmanager-1.32.6 has been released and I was getting the same bug. So back to basics: I unpacked the distro file and issued "./configure; make" and it build perfectly. So then I issued "cd /var/tmp/portage/net-misc/networkmanager-1.32.6/work/NetworkManager-1.32.6-abi_x86_64.amd64" and "make" and that completed the build. I then did a "touch .compiled" and finished the install using ebuild. So I guess that is the equivalent of setting MAKEOPTS.
All is now clear. Thanks. _________________ "Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling |
|
Back to top |
|
|
tismoe n00b
Joined: 03 Dec 2020 Posts: 2
|
Posted: Mon Aug 30, 2021 7:08 pm Post subject: |
|
|
If you happen to run into this when using distcc: I just stumbled across the very same problem emerging net-misc/networkmanager-1.32.4 and got it solved by prohibiting distributed compilation for the package through package.env. Building it in parallel locally (-j8 -l8) still works fine, though. _________________ Man kann von keiner Leiche verlangen wirklich tot zu sein. |
|
Back to top |
|
|
|