[Pas2js] missing rtl.js

Michael Van Canneyt michael at freepascal.org
Thu Jul 25 08:07:12 CEST 2019



On Wed, 24 Jul 2019, warleyalex via Pas2js wrote:

> oba, I've built today pas2js directly from the trunk!
>
> a) One strange thing is the missing rtls.js from the trunk
> https://svn.freepascal.org/svn/projects/pas2js/trunk/packages/rtl/
>
> I manually have copied this required file to the folder ..packages/rtl/ to
> compile some projects.

This is normal, the file is located under pas2js/compiler/utils/pas2js/dist,
because it is tightly coupled to the compiler, not to the rtl.

I have a symlink in packages/rtl/ to this file.

>
> b) the required pas2js_rtl package does not compile out the box. 
> When I compile a project from the demos/translate_basic.lpr for instance,
> 
> It shows this msg:
> ========================================
> Project: Executing command before: Exit code 6, Errors: 1
> Pas2JS Compiler version 1.5.1 [2019/07/24] for Win64 x86_64
> Copyright (c) 2019 Free Pascal team.
> translate_basic.lpr(5,5) Error: can't find unit "System"
> Fatal: Compilation aborted
> Panic: tool stopped with exit code 6. Use context menu to get more
> information.
> ========================================
>
> We can not compile a pas2js project because it requires this dependency
> 'pas2js_rtl'.
> but if I include the package "pas2js_rtl" this error disappear.

Normally, the dependency is not necessary when compiling. 
The packages serve only for the IDE to find sources.

That it does not find the system unit means your self-compiled pas2js does not have a pas2js.cfg set up correctly.
You can copy the distributed version to the location of the binary  and adapt the paths.

Michael.


More information about the Pas2js mailing list