Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnukfreebsd compilation #302

Closed
benkasminbullock opened this issue Nov 16, 2015 · 5 comments
Closed

gnukfreebsd compilation #302

benkasminbullock opened this issue Nov 16, 2015 · 5 comments
Milestone

Comments

@benkasminbullock
Copy link
Contributor

Currently the default compilation fails on gnukfreebsd.

See this:

http://www.cpantesters.org/cpan/report/6e229334-8b8f-11e5-afef-e7dd1d056eec

and this:

http://www.cpantesters.org/cpan/report/77888ed8-8b85-11e5-afef-e7dd1d056eec

There doesn't seem to be a gnukfreebsd handler in the options in tidyplatform.h.

@geoffmcl
Copy link
Contributor

@benkasminbullock ok, it looks like it is trying to include <sys/utime.h> because HAS_FUTIME is defined as 1.

tidy-html5.h:446:23: fatal error: sys/utime.h: No such file or directory`

It seems tidy-html5.h header is generated by make-c-file.pl, but looks like a simple combining of the tidy headers tidyplatform.h, tidyenum.h, tidy.h, and tidybuffio.h...

Does the gnukfreebsd platform have <utime.h> instead?

If yes, then we need a way to detect the OS...

In tidyplatform.h we already have several BSD_BASED_OS, namely __FreeBSD__, __NetBSD__, __OpenBSD__, __DragonFly__, __MINT__, __bsdi__.

What would be the equivalent in gnukfreebsd? And HAS_FUTIME could be set to 0.

I further assume PRESERVE_FILE_TIMES is set to 1 in this platform. Is it?

If this option is off then maybe we do not need the utime() functions, or perhaps there is an aternative that can set the file time appropriately...

Of course I need big HELP to fix this since I do not have access to a gnukfreebsd box to test...

@geoffmcl geoffmcl added this to the 5.1 milestone Nov 16, 2015
@geoffmcl
Copy link
Contributor

@benkasminbullock I have now looked at the make-c-file.pl found at HTML-Valid-0.00_01, and you seem to have understood this, and there is a sub print_h_defines ($out); which does set -

#define PRESERVE_FILE_TIMES 0
#define HAS_FUTIME 0

This is set at the top, and maybe tidybuffio.h just needs to be adjusted to watch if these have already been so defined, and not reset their value... and does not need to include either <sys/utime.h> nor <utime.h> at all...

Should be a simple fix...

@benkasminbullock
Copy link
Contributor Author

@geoffmcl Just to be clear I don't have gnuk/freebsd either, I got these reports from CPAN testers. I am just passing along the information. I don't want to use the file operations from tidy-html5 so I have switched that off, as you correctly noticed. The tests above are for this version of the source code:

https://metacpan.org/source/BKB/HTML-Valid-0.00_01

The results look like this:

http://matrix.cpantesters.org/?dist=HTML-Valid+0.00_01

The currently testing source code is as follows:

https://metacpan.org/source/BKB/HTML-Valid-0.00_02

I don't have gnukfreebsd results yet:

http://matrix.cpantesters.org/?dist=HTML-Valid+0.00_02

As it says in the comments of make-c-file.pl, I don't expect to use any of the file operations in tidy-html5, but only use it to operate on in-memory buffers, so for my own purposes I am just switching PRESERVE_FILE_TIMES off wholesale. However I reported this in case the tidy-html5 project wanted to support the gnukfreebsd platform for the standalone program or for other languages or projects.

I'll continue to report issues as I find them. I hope it helps.

@geoffmcl
Copy link
Contributor

@benkasminbullock ok, you do not have a gnuk/freebsd, nor I presume a Darwin box for #305. And to me these small build problems can only be addressed by a person with that OS, and who is willing to conduct tests, and help in a fix...

There seems no way I could guess what needs to be done from these simple error reports, without the ability to test and confirm... We do want to support just about every platform, including gnukfreebsd and darwin, but I can only test in the platforms I have.

So this HTML Tidy issues does not seem like the right place for these reports.

  1. First there could be many, and would increase if such CPAN Testers and/or meta::cpan extend to say HTML-Tidy-1.56, and any others using HTML Tidy library.
  2. Could be open for a long time, until the above mentioned developer with that particular setup comes forward, thus pollutes the list.
  3. Some of the results seem inconsistent. HTML-Valid+0.00_01 reports darwin as green, gnukfreedsb orange, and HTML-Valid 0.00_02 the reverse, albeit different versions?

So I have moved these to one of our public list, say https://lists.w3.org/Archives/Public/html-tidy/ under the topic like CPAN Tester Error Reports - see https://lists.w3.org/Archives/Public/html-tidy/2015OctDec/0007.html

Accordingly, will close this and #305... as stated thanks for reporting...

@benkasminbullock
Copy link
Contributor Author

Some of the results seem inconsistent. HTML-Valid+0.00_01 reports darwin as green, gnukfreedsb orange, and HTML-Valid 0.00_02 the reverse, albeit different versions?

For the gnukfreebsd I think that the fix applied by setting PRESERVE_FILE_TIMES to 0 seems to have worked. For the Darwin results the tested system is slightly different between the two tests. All of the failed tests for 0.00_02 are with a threaded system and the successful tests for 0.00_01 are with a slightly different unthreaded system. The fix I applied for the darwin system is to simply remove every "uint" and "ulong" from tidy-html5. That resolved the compiler errors. These solve my particular problems.

So this HTML Tidy issues does not seem like the right place for these reports.

I will respect your decision. Note that if you have ideas which you want me to apply to test the system I can change the version of HTML Tidy I've used, and try testing them against CPAN testers. I can also contact the testers and ask them for assistance if there is a problem.

Could be open for a long time, until the above mentioned developer with that particular setup comes forward, thus pollutes the list.

If there is anything further I can do to help, please don't hesitate to ask.

geoffmcl added a commit that referenced this issue Nov 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants