Ejabberd can't find include lib "p1_xml/include/ - erlang

I have follow https://www.process-one.net/en/wiki/ejabberd_HTTP_request_handlers/ to create example, I have installed Ejabberd 14.07 on mac os. I have compile this program by using
erlc -I /Applications/ejabberd-14.07/lib/ejabberd-14.07/include -pz /Applications/ejabberd-14.07/lib/ejabberd-14.07/ebin mod_http_hello.erl
But when I compile I have found below Error Message.
/Applications/ejabberd-14.07/lib/ejabberd-14.07/include/jlib.hrl:22: can't find include lib "p1_xml/include/xml.hrl"
/Applications/ejabberd-14.07/lib/ejabberd-14.07/include/jlib.hrl:426: record xmlel undefined
/Applications/ejabberd-14.07/lib/ejabberd-14.07/include/jlib.hrl:466: type xmlel() undefined
I have Searched but didn't find any solution, If you any idea how to solve this error then guide me.

i did the following to get it solved, at the source i ran ./rebar get-deps and ./rebar compile and then i copied the deps to the include folder
cp -R deps/* /lib/ejabberd/include/
after that i was able to compile my module just fine

From 15.03, in order to fix this you must add an argument to erlc: -DNO_EXT_LIB

You missing some dependencies. Run ./rebar get-deps in the root of the ejaberd source directory and look in the ./deps directory.

I have Solved this issue, this is not the proper solution for this error, but I have spent 2 days to solve this so to work ahead I have used this solution.
You can see that xml.hrl file is not found, so I have copied file content to jlib.hrl file, where it is included and it shows no error.
If you are confused about that xml.hrl file is not available so How can the content be copied then for that you have to follow steps to install ejabberd using command line. When you run "make command" it will add all dependencies.
GO to deps -> p1_xml-> xml.hrl

Related

Autoprefixer error in sublime 4, mapping and package.json

hi i installed autoprefixer css via package install . node.js is installed and i think i did everything right but when i try running it this error is showing up:
Autoprefixer
Error: (node:20773) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/"myusername"/Library/Application Support/Sublime Text/Packages/Autoprefixer/node_modules/postcss/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use node --trace-deprecation ... to show where the warning was created)
can someone help me with it ?
thx
This is an issue with one of Autoprefixer's JavaScript dependencies, named postcss. The Autoprefixer plugin hasn't been updated in over a year, so some of its dependencies have grown a little stale. However, as detailed here, the fix is pretty straightforward.
Open the Terminal app, and type in
cd "~/Library/Application Support/Sublime Text/Packages/Autoprefixer"
(don't forget the quotes around the path, as it contains spaces)
Once in that directory, just run
npm update
and the JS deps should be updated. Restart Sublime, and you should be all set.
I found the same error:
[DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in
the "exports" field module resolution of the package at
.../node_modules/tslib/package.json.
Then I solved it by exploring in the file /node_modules/tslib/package.json and update the package.json file with the following.
"exports": {
...,
"./": "./*"
}

Problems when building Drake from source with cmake

I am trying to build and install Drake from source in order to get support for Mosek. I keep running into trouble, however. For the record, I am running macOS Catalina.
Right now my approach has been this:
Clone drake from github to a location on my computer (from https://github.com/RobotLocomotion/drake.git)
Install prereqs
with ./setup/mac/install_prereqs.sh
Run bazel build //... Make a
directory called build and cd build cmake .. and then make
and make install
And in my C++ project, which I build using cmake, I add this to CMakeLists.txt:
link_directories(drakelocation/build/install/lib)
include_directories(drakelocation/build/install/include)
However, when I try to build my project, I get an error that Drake is unable to locate Eigen: 'Eigen/Core' file not found. I was able to work around this by adding:
target_link_libraries(my_lib Eigen3::Eigen) to my CMakeLists.txt
I found this a bit strange, as I expect that Drake includes Eigen when it is built, but at least this made me able to get a bit further.
After this I get a bunch of messages of the type:
no member named 'signbit' in the global namespace
i.e. it seems like Drake suddenly is missing all the standard C++ libraries. I have not yet been able to fix this issue, so this is where I am currently stuck.
Do you have any suggestions, or have you encountered any similar problems before?
Other information:
Using find_package(drake) does not work with my current approach at all (cmake is not able to locate drake-config.cmake). Am I missing something here that is required to make this work? Where does cmake expect libraries to be installed, and how do I install them in that place?
I have also tried skipping the entire bazel build //... step, going directly to the cmake .. step, which did not seem to make any difference.
In between every different build approach I have run bazel clean --expunge to make sure that nothing sticks around from the previous run.
Thanks!
You need to tell CMake where your Drake installation is located:
list(APPEND CMAKE_PREFIX_PATH /absolute/path/to/drakelocation/build/install)
find_package(drake REQUIRED)
add_library(my_lib ...)
target_link_libraries(my_lib drake::drake)
This ensures you have all the necessary compiler and linker flags. Setting the include directory to simply /absolute/path/to/drakelocation/build/install/include is insufficient since it does not contain the include directories of the various dependencies of Drake.
Note that you do not need to call bazel yourself before calling cmake. When you run make install, it will call bazel internally.
Thanks #Jamie that solved the find_package() problem I had.
I still had some trouble with the build. Turns out that there was something wrong with my default SDK path, and that setting "CMAKE_OSX_SYSROOT" according to this: Catalina C++: Using <cmath> headers yield error: no member named 'signbit' in the global namespace after an update to XCode did the trick.
After this, I got a lot of strange error messages from Eigen, complaining that i.e. MatrixXd was not defined in the namespace 'Eigen'. For some reason, uninstalling it with brew uninstall eigen and then downloading and building eigen from source solved those problems.
It now works!

Error : File `l3backend-pdfmode.def' not found. }

I am trying to compile a .tex document into a pdf in TexStudio (and I have also tried in MikTex) and the following error is outputted File l3backend-pdfmode.def not found. I have tried downloading 13backend package but no luck. Do I need to place the package in a specific folder?
I had the same problem, turned out my miktex library was out-of-date
I opened "miktex console" and updated it.
I incurred into the same issue slightly after an upgrade from Debian 10 to Debian 11. For me, removing all the .texlive* directories from my home folder solved it
mv ~/.texlive* /tmp # If you want to restore them later
rm -r ~/.texlive* # If you are sure about deleting
The ~/.texlive2020 directory was rebuilt after running pdflatex.

rebar generate fails after compile successes

I am new to rebar and try to create a demo app to understand the flow.
I have downloaded rebar & ran bootstrap.
I created a project according to this manual:
justenough-otp1
when I run the compile it compiles all the files and when it runs it.
when i try to generate the app it gives me the following error:
WARN: 'generate' command does not apply to directory /users/olive/poznov/Downloads/rebar-master/learn/apps
Command 'generate' not understood or not applicable
i tried to run
./rebar generate
from both the parent folder and apps folder (of course changing the path in the rebar.config file)
any ideas what might cause the problem?
The generate command is used to build a release. It is much more than a simple application: it contains the VM, your application and all the libraries and dependencies needed. So it needs some more information to be generated. You can look at Erlang rebar tutorial: generating releases and upgrades or LYSE release with reltool for more information (learning from the Eralang documentation is much more difficult)

mupdf not building in xcode

Not able to build mupdf. I am getting the following error:
Generating cmap and font files
Apple broke Xcode external targets yet again, and I can't be bothered to fix it.
Run the 'make generate' command manually from now on!
If you see an error while running GEN, you've forgotten.
Building libraries for i386.
GEN generated/cmap_cns.h
/bin/sh: ./build/debug-ios-i386/cmapdump: No such file or directory
make: * [generated/cmap_cns.h] Error 127
Do what the error message tells you to do.
Open a terminal, cd to the mupdf directory, and run "make generate".
The same problem.After "make generate", I restarted Xcode, then build successfully.
I was able to generate the MuPDF library without using any make generate or shell script.
I wrote a small step-by-step tutorial on this post.
Cheers

Resources