haukex / webperl

Run Perl in the browser with WebPerl!

Home Page:https://webperl.zero-g.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fatal error in patchlevel.h

remorse opened this issue · comments

Hi! I was able to get past the bug in pending-author.t by editing it to be skipped. However, now I get the following:

	[...]
	$ cd /Users/rem16/git/webperl
	# Rebuilding /Users/rem16/git/webperl/work/outputperl/opt/perl...
	mkdir /Users/rem16/git/webperl/work/outputperl
	mkdir /Users/rem16/git/webperl/work/outputperl/opt
	mkdir /Users/rem16/git/webperl/work/outputperl/opt/perl
	$ cd /Users/rem16/git/webperl/emperl5
	$ emmake make perl
	/Users/rem16/git/emsdk/emscripten/1.38.21/emcc     perl.c   -o perl
	In file included from perl.c:38:
	./patchlevel.h:132:10: fatal error: 'git_version.h' file not found
	#include "git_version.h"
			 ^~~~~~~~~~~~~~~
	1 error generated.
	shared:ERROR: compiler frontend failed to generate LLVM bitcode, halting
	make: *** [perl] Error 1
	Command "emmake" failed: exit status 2 at build/build.pl line 320.
	$ cd /Users/rem16/git/webperl

This is after something like 15-20 minutes of compiling.

I'm on a Mac, running macOS 10.13.6.

Seems to be part of perl for me:

/Users/daveh/perl5/perlbrew/build/perl-5.24.4/perl-5.24.4/git_version.h
/Users/daveh/perl5/perlbrew/build/perl-5.26.2/perl-5.26.2/git_version.h
/Users/daveh/perl5/perlbrew/perls/perl-5.24.4/lib/5.24.4/darwin-2level/CORE/git_version.h
/Users/daveh/perl5/perlbrew/perls/perl-5.26.2/lib/5.26.2/darwin-2level/CORE/git_version.h

On my computer, it doesn't appear to be in the correct place? That is:

	rem16$ pwd
	/Users/rem16/git/webperl
	rem16$ find . -name "git_version.h" -print
	./work/hostperl/git_version.h

but it doesn't appear to be in the emperl5 directory, where emmake is looking for it.

Hi, thanks for the report, are you building this on Mac OS X? I've only tested the build on Linux so far. I'll look into this issue a little more later to see if there's an easy workaround.

Yes, this is on Mac OS 10.13. Thanks!

Ok, as I said I'll look into it when I get a chance, if you could let me know any other changes you have to make to get the build working on Mac OS X, that'd be great so I could include them in the build instructions!

On my machine, the file is also located at .../webperl/work/hostperl/git_version.h, and AFAICT this is the standard location. I suspect that it not being found means the include directories are not being configured correctly, or your compiler on Mac OS X is behaving differently.

I don't have a Mac OS X setup on which I could test, but what you could try doing is, after a build.pl run, edit emperl5/config.sh and change the incpath variable (or incpth, I'm not sure at the moment) to include the absolute pathname of work/hostperl/, and then run build.pl --applyconfig, and see if that helps.

Closing for now; can be re-opened if necessary.

(Note: The issue apparently only affects building on Mac OS X, but only Linux is "officially" supported at the moment. Adding OSX build support might be nice, but is not high-priority.)