Hello again,

Ran across the following error while building the erlang interface:

```
gcc -o erlang_APL_nif.so -Wall  -fpic -shared -rdynamic -pthread \
 erlang_APL_nif.c -L/usr/local/lib/apl -lapl
erlang_APL_nif.c:36:15: error: #if with no expression
 #if HAVE_DIRTY
               ^
make[2]: *** [Makefile:482: erlang_APL_nif.so] Error 1
```

```
Linux 4.19.0-5-amd64 #1 SMP Debian 4.19.37-3 (2019-05-15) x86_64 GNU/Linux
gcc (Debian 8.3.0-7) 8.3.0
```

I'm including the patch I used to fix it:

Index: erlang/erlang_APL_nif.c
===================================================================
--- erlang/erlang_APL_nif.c (revision 1163)
+++ erlang/erlang_APL_nif.c (working copy)
@@ -33,7 +33,7 @@
 # define HAVE_DIRTY   /* we hope so */
 #endif

-#if HAVE_DIRTY
+#ifdef HAVE_DIRTY
 # define DIRTY_FLAG , ERL_NIF_DIRTY_JOB_CPU_BOUND
 #else
 # define DIRTY_FLAG



Cheers

- Rowan

On Mon, Jun 3, 2019 at 3:32 PM Dr. Jürgen Sauermann <
mail@jürgen-sauermann.de> wrote:

> Hi again,
>
> I have checked in *SVN 1163*. This version should compile  nicely under
> g++ version 5.4.0 (the latest that I have) and also when building *libapl*
> .
>
> It also passes all automated GNU APL test cases and shows no memory
> leaks under valgrind.
>
> Classes *UTF8_string* and *Token_string* have been changed to use
> *std::**basic_string<UTF8> *and *std::vector<Token>* instead of
> *Simple_string<>*.
>
> Class *UCS_string* will be converted next and if that works then I am
> planning to release GNU APL 1.8.
>
> Best Rgeards,
> Jürgen
>
>
>
> On 6/2/19 10:50 PM, Dr. Jürgen Sauermann wrote:
>
> Hi Rowan,
>
> thanks for reporting this. Supposedly fixed in *SVN 1162*.
>
> Best Regards,
> /// Jürgen
>
>
> On 6/2/19 10:17 PM, Rowan Cannaday wrote:
>
> Hello!
>
> I am trying to compile libapl, and am running into the following error:
>
> ```
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -Wall -I sql
> -Wold-style-cast -Werror -I/usr/include -I/usr/include/postgresql -rdynamic
> -g -O2 -MT libapl_la-libapl.lo -MD -MP -MF .deps/libapl_la-libapl.Tpo -c
> libapl.cc  -fPIC -DPIC -o .libs/libapl_la-libapl.o
> libapl.cc: In function 'Value* get_value(APL_value, uint64_t)':
> libapl.cc:210:4: error: 'Z' was not declared in this scope
>     Z.get()->increment_owner_count(LOC);   // keep value
> ```
>
> I am using the following to configure:
> ```
> ./configure --with-libapl
> ```
>
> I have built the interpreter successfully before.
>
> I also generated a tags file for the project and it is unable to find the
> definition for 'Z'.
>
> Any help is appreciated, thank you for your time!
>
>
>
>

Reply via email to