Search code examples
makefileerlanggnu-makeerlang-otp

Trying to compile erlang program using erlang.mk


am trying to compile erlang code using command 'make' on erlang.mk and getting the below error. i dont know where to go from here. am new to erlang.mk and erlang. am on ubuntu

Getting Xabber Web client .... done.
Copying Xabber Web files to 'priv' directory  ........ done.
make[1]: Entering directory '/home/isachi2004/xabber-websocket
/deps/fast_xml'
cc -o priv/lib/fxml.so c_src/fxml.o -lexpat -L -lei   -shared
/usr/bin/ld: cannot find -lexpat
collect2: error: ld returned 1 exit status
c_src/Makefile.erlang.mk:24: recipe for target 'priv/lib/fxml.so'
failed
make[2]: *** [priv/lib/fxml.so] Error 1
Makefile:25: recipe for target 'pre-app' failed
make[1]: *** [pre-app] Error 2
make[1]: Leaving directory '/home/isachi2004/xabber-websocket
/deps/fast_xml'
erlang.mk:4512: recipe for target 'deps' failed
make: *** [deps] Error 2

Solution

  • This error means that it cannot find the development files for the Expat library (an XML parser):

    /usr/bin/ld: cannot find -lexpat
    

    On Ubuntu, you could try installing it with:

    sudo apt install libexpat1-dev