Crystal: Running crystal spec returns: cannot find -lxm12

Created on 2 May 2018  路  7Comments  路  Source: crystal-lang/crystal

I got this error on an Ubuntu Server, 18.04 LTS 64-bit edition which I run through Virtualbox. I have no idea if the same happens on any other system or distro. What I did was:

  • Create a new crystal lib with crystal init lib repo_name.
  • Without any modifications at all, running crystal spec immediately after. Which gave this stacktrace:
/usr/bin/x86_64-linux-gnu-ld: cannot find -lxm12
collect2: error: ld returned 1 exit status
Error: execution of command failed with code: 1: `cc "${@}" -o '/home/myUser/.cache/crystal/crystal-run-spec.tmp' -rdynamic -lxm12 -lpcre -lm -lgc -lpthread /usr/share/crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/lib -L/usr/local/lib`

Crystal compiler version:

Crystal 0.24.2 [4f9ed8d03] (2018-03-08)
LLVM: 4.0.0
Default target: x86_64-unknown-linux-gnu

Most helpful comment

@RX14 time for a release? :smile:

All 7 comments

Duplicate of #5662, which is resolved in master :smiley:

Sorry for posting a duplicate, I did search but apparently not well enough ...

Master would also have told you to install the development packages for libxml2, which likely would have pointed to a solution

@RX14 time for a release? :smile:

@RX14 yeah, I had no idea that I should build from the master branch myself instead of installing the official release. Being simply a curious developer, rather than seeking to be an active contributer to the project.

@beanilsson No, you don't need to build from master, using the current release is fine, too. It just needs libxml.
The comment from @RX14 just indicated that master would also have a better error message indicating what libraries you need to provide.

had no idea that I should build from the master branch myself instead of installing the official release

That wasn't what I was trying to imply. You should continue using the latest release. I was simply saying that the next release will have multiple fixes in this area, instead of just removing libxml2 from spec.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lgphp picture lgphp  路  3Comments

asterite picture asterite  路  3Comments

pbrusco picture pbrusco  路  3Comments

nabeelomer picture nabeelomer  路  3Comments

will picture will  路  3Comments