Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001560graphvizDotpublic2009-03-11 15:502011-04-28 04:03
ReporterStephen C. North2 
Assigned Toellson 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSx86-Linux-ubuntu 8.10OS Version
Summary0001560: build error in lasi plugin - wrong escapes for \\)
Description



<CD>
install liblasi-dev
cd plugin/lasi
rm ps.h
make
mawk -f ../../awk/stringize.awk ./ps.txt > ps.h
/bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../lib/common -I../../lib/pathplan -I../../lib/gvc -I../../lib/graph -I../../lib/cdt -I/usr/include/freetype2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/freetype2 -I/home/north/arch/linux.x86_64/include -g -O2 -MT gvrender_lasi.lo -MD -MP -MF .deps/gvrender_lasi.Tpo -c -o gvrender_lasi.lo gvrender_lasi.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../lib/common -I../../lib/pathplan -I../../lib/gvc -I../../lib/graph -I../../lib/cdt -I/usr/include/freetype2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/freetype2 -I/home/north/arch/linux.x86_64/include -g -O2 -MT gvrender_lasi.lo -MD -MP -MF .deps/gvrender_lasi.Tpo -c gvrender_lasi.cpp -fPIC -DPIC -o .libs/gvrender_lasi.o
In file included from gvrender_lasi.cpp:32:
ps.h:74: error: unknown escape sequence '\\)'
make: *** [gvrender_lasi.lo] Error 1
scn<846>
</CD>



Additional Information

[ellson] Must be a difference between "mawk" and "gawk"

[north] why would we use either?

why not just use awk?

[ellson]
Who knows.

Its a predefined configure check:
   AC_PROG_AWK

appears to search for: gawk mawk nawk awk

Where are you getting mawk from? I don't get it in the gviz userid on stayman from /usr/bin or /opt/local/bin.

When I try it finds /usr/bin/gawk

[north]
<CD>
>
> That might be premature. You haven't determined that it fails with awk.
>
>
>
>
</CD>


i guess i jumped to the conclusion that it succeeds with awk because at
some point you got it to work and checked in the code.

but you're right, i'm wrong, it turns out the code doesn't compile with /usr/bin/awk

this file is identical to core/ps.h which is processed from core/ps.txt using the
script scriptize.awk which was written about 15 years ago.

any idea what is going wrong here?

does this lasi plugin build for you?

[north]
<CD>
>>
>
> Complains at compile time? But with mawk, right?
>
> I get no errors or warnings on Fedora at compile or runtime. With gawk.
>
</CD>


right, mawk

how come plugin/core can compile with mawk, but plugin/lasi cannot????

oh, i see, lasi is a .... (drum roll) C++ program

hooray for C++, as compatible with C as necessary, but no more so!
(nearly verbatim quote from guess who)

<CD>
>
>>
>> i think we really wanted to say \\) to the C compiler so
>> it would printf \) in the Postscript code which is the
>> desired sequence for a literal right paren in Postscript.
>>
>> i don't understand the gsub("\\\\","\\\\", $0) in stringize.awk
>> It would appear that it doesn't do anything!
>> I wonder if something else was intended!
>>
>
> It looks odd, but gawk must be using that line to change \ to \\
>
</CD>

i see there is no gawk on this system (though there is /usr/bin/awk)

so i'll install it

you're right, that gawk uses this to process the \\ correctly.


<CD>
>
>
> Here is the cumulative change since the script was checked in to graphviz2 cvs in 2004.
> Nothing relevant I think.
>
>
</CD>

right


i guess we could rewrite it in sed. but there's gsed to consider.

maybe m4? maybe we can use regular expressions in bourne shell to get the job done? ha ha

anyway we should put the dependence on gawk in the build notes somewhere, except
of course nobody reads them.

it's a pity that we're now dependent on gawk. the main reason for choosing awk was
that it should be the Latin of Unix string processing languages. but it's not.

python?

[ellson]
<CD>
> right, mawk
>
> how come plugin/core can compile with mawk, but plugin/lasi cannot????

It should have the same problem. Did you: rm ps.h ?
>
> oh, i see, lasi is a .... (drum roll) C++ program
>
> hooray for C++, as compatible with C as necessary, but no more so!
> (nearly verbatim quote from guess who)
I don't think the C++ is be relevant to this issue (but please admire how cleverly I wrapped a C++ library into C code ;-)

>
>>
>>>
>>> i think we really wanted to say \\) to the C compiler so
>>> it would printf \) in the Postscript code which is the
>>> desired sequence for a literal right paren in Postscript.
>>>
>>> i don't understand the gsub("\\\\","\\\\", $0) in stringize.awk
>>> It would appear that it doesn't do anything!
>>> I wonder if something else was intended!
>>>
>>
>> It looks odd, but gawk must be using that line to change \ to \\
>>
>
> i see there is no gawk on this system (though there is /usr/bin/awk)
/usr/bin/awk will be a two-level softlink to /usr/bin/mawk. See my previous email.

I don't think there is a "real awk".

>
> so i'll install it
>
> you're right, that gawk uses this to process the \\ correctly.
>
>
>>
>>
>> Here is the cumulative change since the script was checked in to graphviz2 cvs in 2004.
>> Nothing relevant I think.
>>
>>
>
> right
>
>
> i guess we could rewrite it in sed. but there's gsed to consider.
Sed is a lot worse than awk. In fact I was fighting sed this week on IRIX. GNU's sed requires a working sed to build itself! Turkeys.

Sed got really complicated recently when they decided to add i18n support.
>
> maybe m4? maybe we can use regular expressions in bourne shell to get the job done? ha ha
Now that might be safe :)
>
> anyway we should put the dependence on gawk in the build notes somewhere, except
> of course nobody reads them.
This only affects developers building from CVS. Thats about 6 of us.

But the dependence is "recorded" in the various prebuild scripts such as those for Solaris and IRIX.

I've been working on a universal prebuild script, since Solaris, IRIX, MacOS, Windows all need something very similar.

Current version is in prebuild/Makefile.in in the graphviz-build repository.
>
> it's a pity that we're now dependent on gawk. the main reason for choosing awk was
> that it should be the Latin of Unix string processing languages. but it's not.
Was it ever freely distributed? I suspect we've always used gawk externally.

If you can find a gold-standard awk, I'd be interested in whether gawk of mawk is closer.
>
> python?
>
Ha Ha! Have you seen the breakage recently with python 2.6?
</CD>

TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID1601
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENTFixed
VERSION     2.22
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => user695


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker