Doesn't seem to work with 18.04 anymore, running make provides the following error.
In file included from emit.c:9:0:
dynasm/dasm_x86.h: In function ‘dasm_put’:
dynasm/dasm_x86.h:207:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (*p++ == 1 && *p == DASM_DISP) mrm = n; continue;
^~
dynasm/dasm_x86.h:207:45: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
if (*p++ == 1 && *p == DASM_DISP) mrm = n; continue;
^~~~~~~~
emit.c: In function ‘assemble’:
emit.c:24:22: error: ‘actionlist’ undeclared (first use in this function)
dasm_setup(&state, actionlist);
^~~~~~~~~~
emit.c:24:22: note: each undeclared identifier is reported only once for each function it appears in
emit.c:26:3: warning: implicit declaration of function ‘emit’; did you mean ‘exit’? [-Wimplicit-function-declaration]
emit(&state, code);
^~~~
exit
In file included from emit.c:9:0:
dynasm/dasm_x86.h: In function ‘dasm_put’:
dynasm/dasm_x86.h:196:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (n == 0) { if ((mrm&7) == 4) mrm = p[-2]; if ((mrm&7) != 5) break; }
^
dynasm/dasm_x86.h:197:7: note: here
case DASM_IMM_DB: if (((n+128)&-256) == 0) goto ob;
^~~~
dynasm/dasm_x86.h:197:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
case DASM_IMM_DB: if (((n+128)&-256) == 0) goto ob;
^
dynasm/dasm_x86.h:198:7: note: here
case DASM_REL_A: /* Assumes ptrdiff_t is int. !x64 */
^~~~
dynasm/dasm_x86.h:202:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
case DASM_IMM_WB: if (((n+128)&-256) == 0) goto ob;
^
dynasm/dasm_x86.h:203:7: note: here
case DASM_IMM_W: CK((n&-65536) == 0, RANGE_I); ofs += 2; break;
^~~~
dynasm/dasm_x86.h: In function ‘dasm_link’:
dynasm/dasm_x86.h:324:54: warning: this statement may fall through [-Wimplicit-fallthrough=]
case DASM_SPACE: case DASM_IMM_LG: case DASM_VREG: p++;
~^~
dynasm/dasm_x86.h:325:2: note: here
case DASM_DISP: case DASM_IMM_S: case DASM_IMM_B: case DASM_IMM_W:
^~~~
dynasm/dasm_x86.h:328:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
case DASM_LABEL_LG: p++;
~^~
dynasm/dasm_x86.h:329:2: note: here
case DASM_LABEL_PC: b[pos++] += ofs; break; /* Fix label offset. */
^~~~
dynasm/dasm_x86.h: In function ‘dasm_encode’:
dynasm/dasm_x86.h:384:52: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (((n+128) & -256) != 0) goto wd; else mm[-1] -= 0x40;
~~~~~~~^~~~~~~
dynasm/dasm_x86.h:386:2: note: here
case DASM_IMM_S: case DASM_IMM_B: wb: dasmb(n); break;
^~~~
dynasm/dasm_x86.h:389:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
} else mark = NULL;
^
dynasm/dasm_x86.h:390:2: note: here
case DASM_IMM_D: wd: dasmd(n); break;
^~~~
dynasm/dasm_x86.h:391:64: warning: this statement may fall through [-Wimplicit-fallthrough=]
case DASM_IMM_WB: if (((n+128)&-256) == 0) goto db; else mark = NULL;
^
dynasm/dasm_x86.h:392:2: note: here
case DASM_IMM_W: dasmw(n); break;
^~~~
dynasm/dasm_x86.h:395:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
b++; n = (int)(ptrdiff_t)D->globals[-n];
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dynasm/dasm_x86.h:396:2: note: here
case DASM_REL_A: rel_a: n -= (int)(ptrdiff_t)(cp+4); goto wd; /* !x64 */
^~~~
dynasm/dasm_x86.h:406:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
p++; if (n < 0) { n = (int)(ptrdiff_t)D->globals[-n]; goto wd; }
^
dynasm/dasm_x86.h:407:2: note: here
case DASM_IMM_PC: {
^~~~
dynasm/dasm_x86.h:426:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
case DASM_ESC: action = *p++;
~~~~~~~^~~~~~
dynasm/dasm_x86.h:427:2: note: here
default: *cp++ = action; break;
^~~~~~~
make: *** [emit.o] Error 1
Do a make clean then a make. That error is what you get if a previous run of dynasm failed for some reason and left an empty temp file behind. We'd need to know why dynasm failed.
Doesn't seem to work with 18.04 anymore, running
make
provides the following error.