# LFortran installation problem

**URL:** <https://fortran-lang.discourse.group/t/lfortran-installation-problem/5439>\
**Category:** Help\
**Created:** [March 24, 2023, 5:14pm UTC](https://fortran-lang.discourse.group/t/lfortran-installation-problem/5439 "2023-03-24T17:14:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![general\_rishkin](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@general\_rishkin](https://fortran-lang.discourse.group/u/general_rishkin)\
**Post date:** [March 24, 2023, 5:14pm UTC](https://fortran-lang.discourse.group/t/lfortran-installation-problem/5439/1 "2023-03-24T17:14:10Z")

</div>

I just tried installing LFortran from the latest tarball (0.17) but when I run `make -j8`, I get the following error:

> In file included from /home/grishkin/lfortran-0.17.0-11-g36f3f4875/src/libasr/codegen/asr\_to\_wasm.cpp:11:  
> /home/grishkin/lfortran-0.17.0-11-g36f3f4875/src/libasr/…/libasr/codegen/wasm\_assembler.h:129:5: error: use of undeclared identifier ‘assert’
> 
> assert(num.size() \<= 4);  
> ^  
> 1 error generated.

I have checked and wasm\_assembler.h has cassert included at the start.

The default compiler was gcc 12 so I tried using clang but got the same result.

---

<div class="post-metadata">

**Author:** ![certik](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/certik/32/4_2.png) [@certik](https://fortran-lang.discourse.group/u/certik)\
**Post date:** [March 24, 2023, 6:51pm UTC](https://fortran-lang.discourse.group/t/lfortran-installation-problem/5439/2 "2023-03-24T18:51:12Z")

</div>

Thanks for the report. What platform are you on? Linux? x86 or arm? 64bit?

It should build, so we’ll have to debug this. You can also try the latest git version.

---

<div class="post-metadata">

**Author:** ![general\_rishkin](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@general\_rishkin](https://fortran-lang.discourse.group/u/general_rishkin)\
**Post date:** [March 24, 2023, 10:42pm UTC](https://fortran-lang.discourse.group/t/lfortran-installation-problem/5439/3 "2023-03-24T22:42:07Z")

</div>

I am on Ubuntu 22.10 64-bit.

I also tried the git version - same error.

---

<div class="post-metadata">

**Author:** ![certik](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/certik/32/4_2.png) [@certik](https://fortran-lang.discourse.group/u/certik)\
**Post date:** [March 25, 2023, 7:17pm UTC](https://fortran-lang.discourse.group/t/lfortran-installation-problem/5439/4 "2023-03-25T19:17:51Z")

</div>

Try commenting that one assert line, and see if it continues. We test Ubuntu at our CI and everything works, so it must be some slight incompatibility with our CI setup and your local setup. If you manage to fix it, please send us a PR!

---

<div class="post-metadata">

**Author:** ![septc](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/septc/32/77_2.png) [@septc](https://fortran-lang.discourse.group/u/septc)\
**Post date:** [March 26, 2023, 10:25pm UTC](https://fortran-lang.discourse.group/t/lfortran-installation-problem/5439/5 "2023-03-26T22:25:41Z")

</div>

Is it possibly useful to try to compile something like

```cpp
// mytest.cpp
#include <cassert>
int main()
{
    int x = 1;
    assert( x == 1 );
}

```

as

```auto
$ g++-12 -E mytest.cpp | grep assert

# 1 "/usr/include/c++/12/cassert" 1 3
# 41 "/usr/include/c++/12/cassert" 3
# 42 "/usr/include/c++/12/cassert" 3
# 44 "/usr/include/c++/12/cassert" 2 3
# 1 "/usr/include/assert.h" 1 3 4
# 66 "/usr/include/assert.h" 3 4
...

```

or similarly

```auto
$ clang++ mytest.cpp | grep assert

```

? One possibility might be that there are some other `assert.h` in the include path that interferes with the desired one. For example, if I put “assert.h” in the current directory like

```cpp
// ./assert.h
/* foo */

```

I get an error

```auto
$ g++-12 -I. mytest.cpp
mytest.cpp: In function ‘int main()’:
mytest.cpp:7:5: error: ‘assert’ was not declared in this scope
    7 | assert( x == 1 );
      | ^ ~~~~~

```

In the case of clang, the error message becomes like this (similar to OP)

```auto
$ clang++ -I. mytest.cpp 
mytest.cpp:7:5: error: use of undeclared identifier 'assert'
    assert( x == 1 );
    ^

```
