Opened 7 years ago

Closed 6 years ago

#54493 closed defect (fixed)

libnetpbm 10.79.02_1 fails to build (still!) with python-3.6 -- makeman

Reported by: gnw3 Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.4.1
Keywords: Cc: mndavidoff (Monte Davidoff), jkulesza (Joel A. Kulesza)
Port: libnetpbm

Description

Upstream has more work to do.

DEBUG: system -W /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_graphics_netpbm/libnetpbm/work/userguide: /usr/bin/gnumake MAKEMAN='/opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_graphics_netpbm/libnetpbm/work/advanced/buildtools/makeman -v' USERGUIDE=. -f /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_graphics_netpbm/libnetpbm/work/advanced/buildtools/manpage.mk manpages
Converting libnetpbm.html to libnetpbm.3
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_graphics_netpbm/libnetpbm/work/advanced/buildtools/makeman", line 344
    os.rename(tempfile, stem + "." + `sectmap[file]`)
                                     ^
SyntaxError: invalid syntax
gnumake: *** [libnetpbm.3] Error 1

I sent the attached patch, which worked in limited testing with python2.6, 2.7, and 3.6, to upstream. For anyone who gets to the above error and is in a rush to get libnetpbm, you can try patching makeman and restart the build.

Attachments (2)

makeman.diff (2.3 KB) - added by gnw3 7 years ago.
attempt to support python3
jkulesza_main.log (39.7 KB) - added by jkulesza (Joel A. Kulesza) 7 years ago.

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by gnw3

Attachment: makeman.diff added

attempt to support python3

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Cc: ryandesign@… removed
Owner: set to ryandesign
Status: newassigned

comment:2 Changed 7 years ago by mndavidoff (Monte Davidoff)

Cc: mndavidoff added

comment:3 Changed 7 years ago by blair (Blair Zajac)

Applying the patch I get further and then this error:

makeman: pgmminkowski.html
Converting pgmmorphconv.html to pgmmorphconv.1
Traceback (most recent call last):
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_netpbm/netpbm/work/advanced/buildtools/makeman", line 363, in <module>
    raise SystemExit(main(sys.argv[1:]))
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_netpbm/netpbm/work/advanced/buildtools/makeman", line 290, in main
    indoc = infp.read()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 3575: invalid start byte
gnumake: *** [pgmmorphconv.1] Error 1

comment:4 Changed 7 years ago by gnw3

My libnetpbm build log only shows a few pages being processed:

DEBUG: Executing proc-post-org.macports.build-build-0
DEBUG: system -W /opt/local/var/macports/build/_opt_local_var_macports_sources_gi
thub.com_macports_macports-ports_graphics_netpbm/libnetpbm/work/userguide: /usr/b
in/gnumake MAKEMAN='/opt/local/var/macports/build/_opt_local_var_macports_sources
_github.com_macports_macports-ports_graphics_netpbm/libnetpbm/work/advanced/build
tools/makeman -v' USERGUIDE=. -f /opt/local/var/macports/build/_opt_local_var_mac
ports_sources_github.com_macports_macports-ports_graphics_netpbm/libnetpbm/work/a
dvanced/buildtools/manpage.mk manpages
Converting libnetpbm.html to libnetpbm.3
makeman: libnetpbm.html
Converting pam.html to pam.5
makeman: pam.html
Converting pbm.html to pbm.5
makeman: pbm.html
Converting pgm.html to pgm.5
makeman: pgm.html
Converting pnm.html to pnm.5
makeman: pnm.html
Converting ppm.html to ppm.5
makeman: ppm.html

Building netpbm converts many more documents. In pgmmorphconv.html there is:

<p>For more information about morphological convolutions, see e.g. 
<ul>
<li><a
href="http://rugth30.phys.rug.nl/compphys0/2001.htm"> K. Michielsen and
H. De Raedt, "Integral-Geometry Morphological Image Analysis",<A0>
Phys. Rep. 347, 461-538 (2001).</a>

where the "<A0>" is the Unicode no-break space character. A simple workaround is to delete that character in

/opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_graphics_netpbm/netpbm/work/userguide/pgmmorphconv.html

comment:5 Changed 7 years ago by jkulesza (Joel A. Kulesza)

I'm having a similar problem (see attached jkulesza_main.log).

Changed 7 years ago by jkulesza (Joel A. Kulesza)

Attachment: jkulesza_main.log added

comment:6 Changed 7 years ago by jkulesza (Joel A. Kulesza)

Cc: jkulesza added

comment:7 Changed 7 years ago by jkulesza (Joel A. Kulesza)

Applying the patch worked for me; thank you for providing this workaround.

comment:8 Changed 6 years ago by mndavidoff (Monte Davidoff)

This problem appears to be fixed in libnetpbm @10.81.02_0. I was able to build libnetpbm with the MacPorts default python set to python36.

comment:9 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.