Opened 15 years ago

Closed 15 years ago

#1397 closed defect (fixed)

Solaris awk fails on vidix/pci_db2c.awk

Reported by: g.s@… Owned by: diego@…
Priority: normal Component: DOCS
Version: HEAD Severity: minor
Keywords: Cc: attila@…
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

vidix/pci_db2c.awk doesn't work with /usr/bin/awk on Solaris 10, however /usr/bin/nawk works fine.
It's being called from vidix/Makefile

Change History (13)

comment:1 by diego@…, 15 years ago

Resolution: invalid
Status: newclosed

You are using a totally outdated version of MPlayer and have provided absolutely no details to analyze or reproduce your problem. Also, Solaris is known for its broken and not standards-conforming userland. I am closing this as INVALID, which I believe it to be. If you can find our awk script at fault, reopen the bug. Here is the relevant standard against which to validate our script:

http://www.opengroup.org/onlinepubs/009695399/utilities/awk.html

comment:2 by g.s@…, 15 years ago

Resolution: invalid
Status: closedreopened

If a platform is supported, but a "configure && make" doesn't work on that platform, the build process must be broken. And as the header says:

# Tested with Gawk v 3.0.x and Mawk 1.3.3
# But it should work with standard Awk implementations (hopefully).
# (Nobody tested it with Nawk, but it should work, too).

Now I tested it with a standard awk implementation and it failed to work. And like I wrote, I also tested it with nawk and it worked, so it might be a good idea to use nawk on Solaris.
And yes, I reported the bug for an older version, but it still isn't fixed in the sources of SVN-r28403 (mplayer-export-2009-01-31). And if you're not interested in bugs of older versions, why don't you have it removed from the drop down menu?
Here's the error message from the SVN-r28403:

awk -f vidix/pci_db2c.awk vidix/pci.db 1
awk: syntax error near line 70
awk: illegal statement near line 70
awk: syntax error near line 79
awk: illegal statement near line 79
awk: syntax error near line 131
awk: bailing out near line 131

On Solaris the tools in /usr/bin behave like they always did. If you want tools to comply to the latest standards, look in /usr/xpg6/bin and /usr/xpg4/bin, first.

If you're not interested in supporting Solaris, just tell so.

comment:3 by diego@…, 15 years ago

(In reply to comment #2)

If a platform is supported, but a "configure && make" doesn't work on that
platform, the build process must be broken.

True, the breakage must be somewhere. However, it might well be a problem on your system. On Solaris, the latter is often the case.

And as the header says:

# Tested with Gawk v 3.0.x and Mawk 1.3.3
# But it should work with standard Awk implementations (hopefully).
# (Nobody tested it with Nawk, but it should work, too).

Now I tested it with a standard awk implementation and it failed to work.

What "standard" awk version was that?

And like I wrote, I also tested it with nawk and it worked, so it might be a
good idea to use nawk on Solaris.
Here's the error message from the SVN-r28403:

awk -f vidix/pci_db2c.awk vidix/pci.db 1
awk: syntax error near line 70
awk: illegal statement near line 70
awk: syntax error near line 79
awk: illegal statement near line 79
awk: syntax error near line 131
awk: bailing out near line 131

Can you find out exactly what line/statement/construct is causing the problems?

On Solaris the tools in /usr/bin behave like they always did. If you want
tools to comply to the latest standards, look in /usr/xpg6/bin and
/usr/xpg4/bin, first.

That's why you should adjust your path so that the sane tools are used instead of the broken ones.

If you're not interested in supporting Solaris, just tell so.

I'm not the least interested in adding hacks to configure to support broken systems.

comment:4 by g.s@…, 15 years ago

Resolution: wontfix
Status: reopenedclosed

Not interested in making configure use the right tools on systems other than Linux.

comment:5 by attila@…, 15 years ago

(In reply to comment #4)

Not interested in making configure use the right tools on systems other than
Linux.

No, we are not interested in people complaining that something doesn't work
without providing any real information and then pissing us off with such
insulting comments.

Look, if you want a bug fixed, then _you_ have to provide us with information.
And _you_ have to be polite, because _you_ are asking us to invest _our_
free time to do something _for_you_!

Putting your rudeness aside, you have to first realize that solaris still
ships pre-posix tools in /usr/bin for compatibility reasons (compatibility
to what i have no clue, because it makes solaris incompatible to anything else).

Hence, the easiest solution is to put the posix compliant tools which are
shipped together with your solaris ever since sunos was renamed solaris
into the $PATH variable like any other good boy and be done with it.

comment:6 by diego@…, 15 years ago

Resolution: wontfix
Status: closedreopened
Summary: awk fails on vidix/pci_db2c.awkSolaris awk fails on vidix/pci_db2c.awk

(In reply to comment #4)

Not interested in making configure use the right tools on systems other than
Linux.

False, this has absolutely nothing to do with Linux, nor with GNU tools. It's about Solaris refusing to follow standards of portability, namely POSIX.

comment:7 by diego@…, 15 years ago

rep_platform: PC (x86)All
Resolution: fixed
Status: reopenedclosed
Version: 1.0rc2HEAD

I'm plenty sick of Solaris bug reports. I have added a workaround to configure that sets a sane default path. This should fix this issue.

comment:8 by g.s@…, 15 years ago

This is not about being rude, this is about whose bug it is. The documentation says that I need the "GNU C/C++ compiler, configured to use the GNU assembler" and "GNU make", so I did.
However, it does not say anything about requiring a different AWK than the one which is in your PATH after doing a default installation. It is well documented that /usr/bin/awk does not comply to the latest standards and that you can find XPG4-complying tools in /usr/xpg4/bin/. So I reported that you are errornously using /usr/bin/awk and the reply I got was that my default installation of a supported operating system was broken.
If you don't want to edit the configure script, just edit the MPlayer documentation and tell the people to use a diffent path for building MPlayer instead of blaming Solaris for working as documented. But when people need to to manual adjustments before running make, where's the sense in configure?

awk -f vidix/pci_db2c.awk vidix/pci.db 1

awk: syntax error near line 70

awk: illegal statement near line 70
awk: syntax error near line 79
awk: illegal statement near line 79
awk: syntax error near line 131
awk: bailing out near line 131

Can you find out exactly what line/statement/construct is causing the problems?

Line 70 is init_name_db();
Line 79 is init_device_db()
Line 131 is {

In addition to /usr/bin/nawk, /usr/xpg4/bin/awk also works fine.

comment:9 by diego@…, 15 years ago

Resolution: fixed
Status: closedreopened

(In reply to comment #8)

This is not about being rude, this is about whose bug it is.

One thing is clear: If you are using Solaris without /usr/xpg4/bin in your path, your system is broken and there is nothing we can do about it. It is common wisdom that you have to add this directory to your path.

If you don't want to edit the configure script, just edit the MPlayer
documentation and tell the people to use a diffent path for building MPlayer
instead of blaming Solaris for working as documented.

You have a point here. I will update the documentation in a moment.

comment:10 by diego@…, 15 years ago

Component: build systemDOCS
Resolution: fixed
Status: reopenedclosed

Documentation fix committed. Note that it make take a day for the online documentation to get rebuilt and another for all the mirrors to pick it up.

comment:11 by attila@…, 15 years ago

Resolution: fixed
Status: closedreopened

This bug was caused by commit r23335.
Please revert

comment:12 by attila@…, 15 years ago

Cc: attila@… added

comment:13 by diego@…, 15 years ago

Resolution: fixed
Status: reopenedclosed

(In reply to comment #11)

This bug was caused by commit r23335.
Please revert

This was intentional and will stay the way it is. See my detailed reply on the mailing list.

Note: See TracTickets for help on using tickets.