Page MenuHomePhorge

Document how to install javelinsymbols
Open, Needs TriagePublic

Description

Basically javelinsymbols is sometime required in Phorge. See D25457 and its buildable B925 that exploded with:

javelinsymbols Not In Path

It seems it's related to this repository that at the time of writing (2023-11-13) it's not in we.Phorge.it:

https://github.com/phacility/javelin

I totally don't understand how to compile javelinsymbols it so here a stub. Please feel free to contribute.

Note that javelinsymbols depends on libfbjs. So, stub:

# Installing 'flex' package (example for Debian and Ubuntu)
sudo apt install --yes flex

# Having this repo:
git clone https://github.com/phacility/javelin
cd javelin

# Compile libfbjs
cd externals/libfbjs`
make

At this point I receive:

walker.hpp:4:10: fatal error: boost/ptr_container/ptr_vector.hpp: No such file or directory
    4 | #include <boost/ptr_container/ptr_vector.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Event Timeline

To fix this error:

walker.hpp:4:10: fatal error: boost/ptr_container/ptr_vector.hpp: No such file or directory
    4 | #include <boost/ptr_container/ptr_vector.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Somebody said https://stackoverflow.com/a/21923803 to install this package:

sudo apt install libboost-all-dev

But, in my laptop, that is 470MB of dependencies to be installed and I don't like it. So I stop this stub. Feel free to continue.

(see also https://secure.phabricator.com/T2378 which links D5561, D5968, D5670 for those not logged in.)

Following https://secure.phabricator.com/book/javelin/article/facebook/ I had to install bison, flex, boost-devel on a Fedora machine with gcc-13.2 and had to change only one line (though no clue if correct) to make everything compile (while ignoring dozens of warnings):

diff --git a/externals/libfbjs/node.hpp b/externals/libfbjs/node.hpp
index f9751ec..f559e35 100644
--- a/externals/libfbjs/node.hpp
+++ b/externals/libfbjs/node.hpp
@@ -833,7 +833,7 @@ namespace fbjs {
         if (wut.empty()) {
           wut =
             "SyntaxError on line " +
-            static_cast<std::stringstream&>(std::stringstream() << lineno << ": ").str() +
+            static_cast<std::stringstream>(std::stringstream() << lineno << ": ").str() +
             std::runtime_error::what();
         }
         return wut.c_str();