Skip to content

Compile without readline fails #157

@pmhahn

Description

@pmhahn

I tried to compile remake 4.3 from git on Ubuntu 22.04 for #156, which fails:

$ make

make[1]: Entering directory '~/remake'
gcc -C -Wall -Wbad-function-cast -Wchar-subscripts -Wdeclaration-after-statement -Wdisabled-optimization -Wendif-labels -Wextra -Wformat-security -Wformat-signedness -Winline -Wlogical-op -Wlong-long -Wnested-externs -Wno-sign-compare -Wpointer-arith -Wshadow -Wtype-limits -Wunused -Wunused-but-set-parameter -Wunused-parameter -Wwrite-strings  -g -O2 -Wl,--export-dynamic  -o make src/alloc.o src/ar.o src/arscan.o src/buildargv.o src/commands.o src/debug.o src/default.o src/dir.o src/expand.o src/file.o src/file_basic.o src/function.o src/getopt.o src/getopt1.o src/globals.o src/guile.o src/hash.o src/implicit.o src/job.o src/load.o src/loadapi.o src/main.o src/misc.o src/output.o src/print.o src/profile.o src/read.o src/remake.o src/rule.o src/signame.o src/strcache.o src/trace.o src/variable.o src/version.o src/vpath.o src/callgrind_format.o src/json_format.o src/posixos.o  src/remote-stub.o   lib/libgnu.a  libdebugger/libdebugger.a  
/usr/bin/ld: libdebugger/libdebugger.a(cmd.o): warning: relocation against `short_command' in read-only section `.text'
/usr/bin/ld: libdebugger/libdebugger.a(help.o): in function `dbg_cmd_help':
~/remake/libdebugger/command/help.c:120: undefined reference to `short_command'
/usr/bin/ld: ~/remake/libdebugger/command/help.c:126: undefined reference to `find_command'
/usr/bin/ld: libdebugger/libdebugger.a(help.o): in function `printf':
/usr/include/x86_64-linux-gnu/bits/stdio2.h:112: undefined reference to `short_command'
/usr/bin/ld: libdebugger/libdebugger.a(set.o): in function `dbg_cmd_set':
~/remake/libdebugger/command/set.c:124: undefined reference to `whitespace'
/usr/bin/ld: ~/remake/libdebugger/command/set.c:137: undefined reference to `dbg_cmd_set_var'
/usr/bin/ld: libdebugger/libdebugger.a(show.o): in function `dbg_cmd_show':
~/remake/libdebugger/command/show.c:115: undefined reference to `dbg_cmd_show_command'
/usr/bin/ld: libdebugger/libdebugger.a(cmd.o): in function `enter_debugger':
~/remake/libdebugger/cmd.c:384: undefined reference to `add_history'
/usr/bin/ld: ~/remake/libdebugger/cmd.c:385: undefined reference to `execute_line'
/usr/bin/ld: ~/remake/libdebugger/cmd.c:387: undefined reference to `add_history'
/usr/bin/ld: libdebugger/libdebugger.a(cmd.o): in function `dbg_cmd_break_init':
~/remake/libdebugger/cmd_initialize.h:117: undefined reference to `short_command'
/usr/bin/ld: ~/remake/libdebugger/cmd_initialize.h:118: undefined reference to `short_command'
/usr/bin/ld: libdebugger/libdebugger.a(cmd.o): in function `cmd_initialize':
~/remake/libdebugger/cmd_initialize.h:349: undefined reference to `short_command'
/usr/bin/ld: ~/remake/libdebugger/cmd_initialize.h:349: undefined reference to `short_command'
/usr/bin/ld: libdebugger/libdebugger.a(cmd.o): in function `dbg_cmd_chdir_init':
~/remake/libdebugger/cmd_initialize.h:124: undefined reference to `short_command'
/usr/bin/ld: libdebugger/libdebugger.a(cmd.o):~/remake/libdebugger/cmd_initialize.h:125: more undefined references to `short_command' follow
/usr/bin/ld: libdebugger/libdebugger.a(setq.o): in function `dbg_cmd_setq':
~/remake/libdebugger/command/setq.c:32: undefined reference to `dbg_cmd_set_var'
/usr/bin/ld: libdebugger/libdebugger.a(setqx.o): in function `dbg_cmd_setqx':
~/remake/libdebugger/command/setqx.c:32: undefined reference to `dbg_cmd_set_var'
/usr/bin/ld: libdebugger/libdebugger.a(source.o): in function `dbg_cmd_source':
~/remake/libdebugger/command/source.c:74: undefined reference to `execute_line'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:1271: make] Error 1
make[1]: Leaving directory '~/remake'
make: *** [Makefile:1415: all-recursive] Error 1

A sudo apt install --no-install-recommends libreadline-dev fixed this, but still it would be better if the build process would work when it is unavailable.

At least update the installation documentation to include libreadline-dev.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions