#44546: appstream-glib fails to upgrade to Version 0.2.3_0 (Mac OSX Lion 10.7.5 , Macports : 2.3.1) -------------------------------+---------------------- Reporter: creativecommon@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: appstream-glib | -------------------------------+---------------------- Comment (by devans@…): From your log file, gtkdoc-fixxref (a perl script provided by gtk-doc) is failing as follows: {{{ :info:build gtkdoc-fixxref --module=appstream-glib --module-dir=html --html-dir=/macports/share/gtk-doc/html :info:build readline() on closed filehandle NEWFILE at /macports/bin /gtkdoc-fixxref line 481. :info:build Use of uninitialized value $highlighted_source in substitution (s///) at /macports/bin/gtkdoc-fixxref line 484. :info:build Use of uninitialized value $highlighted_source in substitution (s///) at /macports/bin/gtkdoc-fixxref line 485. :info:build Use of uninitialized value $highlighted_source in substitution (s///) at /macports/bin/gtkdoc-fixxref line 489. :info:build Use of uninitialized value $highlighted_source in substitution (s///) at /macports/bin/gtkdoc-fixxref line 490. :info:build Use of uninitialized value $highlighted_source in substitution (s///) at /macports/bin/gtkdoc-fixxref line 491. :info:build Use of uninitialized value $highlighted_source in substitution (s///) at /macports/bin/gtkdoc-fixxref line 492. :info:build Use of uninitialized value $highlighted_source in substitution (s///) at /macports/bin/gtkdoc-fixxref line 493. :info:build Use of uninitialized value $highlighted_source in substitution (s///) at /macports/bin/gtkdoc-fixxref line 494. :info:build Use of uninitialized value $highlighted_source in substitution (s///) at /macports/bin/gtkdoc-fixxref line 495. :info:build Can't delete html/_temp_src.2792.h.html: No such file or directory at /macports/bin/gtkdoc-fixxref line 500. :info:build make[3]: *** [html-build.stamp] Error 2 :info:build make[3]: Leaving directory `/macports/var/macports/build/_macports_var_macports_sources_rsync.macports .org_release_tarballs_ports_devel_appstream-glib/appstream-glib/work /appstream-glib-0_2_3/docs/api' }}} The pertinent lines in gtkdoc-fixxref are as follows: {{{ # write source to a temp file my $temp_source_file="$MODULE_DIR/_temp_src.$$.h"; open (NEWFILE, ">$temp_source_file") || die "Can't open $temp_source_file: $!"; print NEWFILE $source; close (NEWFILE); # format source system "echo 'let html_number_lines=0|let html_use_css=1|let html_use_xhtml=1|syn on|e $temp_source_file|run! syntax/2html.vim|w! $temp_source_file.html|qa!' | /usr/bin/vim -n -e -u NONE -T xterm
/dev/null";
my $highlighted_source; { local $/; open (NEWFILE, "<$temp_source_file.html"); $highlighted_source = <NEWFILE>; close (NEWFILE); } $highlighted_source =~ s#.*<pre\b[^>]*>\n##s; $highlighted_source =~ s#</pre>.*##s; # need to rewrite the stylesheet classes # FIXME: Vim has somewhat different syntax groups $highlighted_source =~ s%<span class="Comment">%<span class="comment">%gs; $highlighted_source =~ s%<span class="PreProc">%<span class="preproc">%gs; $highlighted_source =~ s%<span class="Statement">%<span class="keyword">%gs; $highlighted_source =~ s%<span class="Identifier">%<span class="function">%gs; $highlighted_source =~ s%<span class="Constant">%<span class="number">%gs; $highlighted_source =~ s%<span class="Special">%<span class="symbol">%gs; $highlighted_source =~ s%<span class="Type">%<span class="type">%gs; # remove temp files unlink ($temp_source_file) || die "Can't delete $temp_source_file: $!"; unlink ("$temp_source_file.html") || die "Can't delete $temp_source_file.html: $!"; }}} Comparing the two, it looks like the current source being processed is copied to a temp file (html/_temp_src.2792.h) and then a system command is executed that uses /usr/bin/vim to format it and save the result in html/_temp_src.2792.h.html. From the error messages, it looks like the first file is being created but the second is not. Does /usr/bin/vim exist on your system? Is there an error in system.log at the failure point that might shed more light on the what's happening? -- Ticket URL: <https://trac.macports.org/ticket/44546#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X