Skip to content

Fails to build - Ubuntu #25

@Ishimachi

Description

@Ishimachi

Unsure why, but CSpydr is failing to build on Ubuntu while all dependencies are met:

./configure 
checking host system type... linux-gnu
checking for C compiler... /usr/bin/gcc
checking whether the C compiler works... yes
checking for linker... /usr/bin/gcc
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config directory... /usr/share/pkgconfig
checking for bear... found.
checking for git... found.
checking for install... found.
checking for find... found.
checking for mkdir... found.
checking for rm... found.
checking for sed... found.
checking for libpkgconf... found.
checking for json-c... found.
checking for acutest... found.
removing existing /home/ishimachi/Repositories/cspydr/config.mk file... done.
generating /home/ishimachi/Repositories/cspydr/config.mk file... done.

generated configuration:
# Auto-generated by `configure`

CC := /usr/bin/gcc
LD := /usr/bin/gcc
CFLAGS :=  -fPIC -flto -Wall -Wextra -Wno-unused-parameter -DDEFAULT_STD_PATH="\"/usr/local/share/cspydr/std\"" -I/usr/include/pkgconf  -I/usr/include/json-c 
LDFLAGS :=  -lm -lpkgconf  -ljson-c 

INSTALL := /usr/bin/install
FIND := /usr/bin/find
MKDIR := /usr/bin/mkdir
RM := /usr/bin/rm
SED := /usr/bin/sed
BEAR := /usr/bin/bear

PREFIX := /usr/local
EXEC_PREFIX := /usr/local
BUILD_PREFIX := /home/ishimachi/Repositories/cspydr/build
BIN_PREFIX := /home/ishimachi/Repositories/cspydr/build/bin

PKG_CONFIG_DIR := /usr/share/pkgconfig
SRC_DIR := /home/ishimachi/Repositories/cspydr/src

CSPC_DEFAULT_STD_PATH := /usr/local/share/cspydr/std

VERSION := 0.1.1
VERSION_X := 0
VERSION_Y := 1
VERSION_Z := 1

GIT_HASH := cad5936

done.

Error logs:

make
make -C /home/ishimachi/Repositories/cspydr/src/compiler LIBCSPC=/home/ishimachi/Repositories/cspydr/build/bin/libcspc.o CSPC=/home/ishimachi/Repositories/cspydr/build/bin/cspc /home/ishimachi/Repositories/cspydr/build/bin/libcspc.o
make[1]: Entering directory '/home/ishimachi/Repositories/cspydr/src/compiler'
make[1]: '/home/ishimachi/Repositories/cspydr/build/bin/libcspc.o' is up to date.
make[1]: Leaving directory '/home/ishimachi/Repositories/cspydr/src/compiler'
make -C /home/ishimachi/Repositories/cspydr/src/compiler LIBCSPC=/home/ishimachi/Repositories/cspydr/build/bin/libcspc.o CSPC=/home/ishimachi/Repositories/cspydr/build/bin/cspc /home/ishimachi/Repositories/cspydr/build/bin/cspc
make[1]: Entering directory '/home/ishimachi/Repositories/cspydr/src/compiler'
/usr/bin/gcc -lm -lpkgconf  -ljson-c  /home/ishimachi/Repositories/cspydr/build/compiler/./context.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./version.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./parser/typechecker.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./parser/directives.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./parser/utils.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./parser/queue.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./parser/parser.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./parser/validator.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./debugger/breakpoint.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./debugger/register.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./debugger/debugger.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./main.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./c_parser/c_lexer.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./c_parser/c_parser.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./preprocessor/preprocessor.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./preprocessor/stdmacros.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./ast/ast_iterator.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./ast/ast_json.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./ast/types.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./ast/ast.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./memory/allocator.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./toolchain.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./timer/timer.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./interpreter/stack.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./interpreter/interpreter.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./interpreter/value.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./platform/win32/win32_platform.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./platform/pkg_config.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./platform/linux/linux_platform.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./error/error.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./error/panic.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./error/default.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./codegen/asm/asm_codegen.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./codegen/asm/relocation.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./codegen/asm/linker.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./codegen/codegen_utils.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./codegen/transpiler/keywords.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./codegen/transpiler/c_codegen.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./hashmap.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./optimizer/constexpr.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./optimizer/optimizer.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./lexer/token.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./lexer/lexer.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./config.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./list.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./io/io.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./io/file.c.o /home/ishimachi/Repositories/cspydr/build/compiler/./util.c.o -o /home/ishimachi/Repositories/cspydr/build/bin/cspc
/usr/bin/ld: /tmp/ccf7MyUz.ltrans0.ltrans.o: in function `align_type':
<artificial>:(.text+0x14b41): undefined reference to `log'
/usr/bin/ld: <artificial>:(.text+0x14b66): undefined reference to `floor'
/usr/bin/ld: <artificial>:(.text+0x14b81): undefined reference to `pow'
/usr/bin/ld: <artificial>:(.text+0x14bbb): undefined reference to `log'
/usr/bin/ld: <artificial>:(.text+0x14be0): undefined reference to `floor'
/usr/bin/ld: <artificial>:(.text+0x14bfb): undefined reference to `pow'
/usr/bin/ld: <artificial>:(.text+0x14c22): undefined reference to `log'
/usr/bin/ld: <artificial>:(.text+0x14c47): undefined reference to `floor'
/usr/bin/ld: <artificial>:(.text+0x14c62): undefined reference to `pow'
/usr/bin/ld: <artificial>:(.text+0x14c95): undefined reference to `log'
/usr/bin/ld: <artificial>:(.text+0x14cba): undefined reference to `floor'
/usr/bin/ld: <artificial>:(.text+0x14cd5): undefined reference to `pow'
/usr/bin/ld: /tmp/ccf7MyUz.ltrans0.ltrans.o: in function `get_type_align':
<artificial>:(.text+0x15364): undefined reference to `log'
/usr/bin/ld: <artificial>:(.text+0x15389): undefined reference to `floor'
/usr/bin/ld: <artificial>:(.text+0x153a4): undefined reference to `pow'
/usr/bin/ld: <artificial>:(.text+0x153de): undefined reference to `log'
/usr/bin/ld: <artificial>:(.text+0x15403): undefined reference to `floor'
/usr/bin/ld: <artificial>:(.text+0x1541e): undefined reference to `pow'
/usr/bin/ld: <artificial>:(.text+0x15445): undefined reference to `log'
/usr/bin/ld: <artificial>:(.text+0x1546a): undefined reference to `floor'
/usr/bin/ld: <artificial>:(.text+0x15485): undefined reference to `pow'
/usr/bin/ld: <artificial>:(.text+0x154b8): undefined reference to `log'
/usr/bin/ld: <artificial>:(.text+0x154dd): undefined reference to `floor'
/usr/bin/ld: <artificial>:(.text+0x154f8): undefined reference to `pow'
/usr/bin/ld: /tmp/ccf7MyUz.ltrans0.ltrans.o: in function `ast_to_json':
<artificial>:(.text+0x1d779): undefined reference to `json_object_to_json_string_ext'
/usr/bin/ld: <artificial>:(.text+0x1d7ae): undefined reference to `json_object_put'
/usr/bin/ld: /tmp/ccf7MyUz.ltrans0.ltrans.o: in function `gen_str':
<artificial>:(.text+0x1d7d4): undefined reference to `json_object_new_string'
/usr/bin/ld: <artificial>:(.text+0x1d7db): undefined reference to `json_object_new_null'
/usr/bin/ld: /tmp/ccf7MyUz.ltrans0.ltrans.o: in function `gen_i32':
<artificial>:(.text+0x1d7f6): undefined reference to `json_object_new_int'
/usr/bin/ld: /tmp/ccf7MyUz.ltrans0.ltrans.o: in function `gen_i64':
<artificial>:(.text+0x1d814): undefined reference to `json_object_new_int64'
/usr/bin/ld: /tmp/ccf7MyUz.ltrans0.ltrans.o: in function `gen_bool':
<artificial>:(.text+0x1d832): undefined reference to `json_object_new_boolean'
/usr/bin/ld: /tmp/ccf7MyUz.ltrans0.ltrans.o: in function `gen_list':
<artificial>:(.text+0x1d854): undefined reference to `json_object_new_null'
/usr/bin/ld: <artificial>:(.text+0x1d85b): undefined reference to `json_object_new_array'
/usr/bin/ld: <artificial>:(.text+0x1d89a): undefined reference to `json_object_array_add'
/usr/bin/ld: /tmp/ccf7MyUz.ltrans0.ltrans.o: in function `gen_tok':
<artificial>:(.text+0x1d8ce): undefined reference to `json_object_new_null'
/usr/bin/ld: <artificial>:(.text+0x1d8d8): undefined reference to `json_object_new_object'
/usr/bin/ld: <artificial>:(.text+0x1d914): undefined reference to `json_object_object_add'
/usr/bin/ld: <artificial>:(.text+0x1d947): undefined reference to `json_object_object_add'
/usr/bin/ld: <artificial>:(.text+0x1d97c): undefined reference to `json_object_object_add'
/usr/bin/ld: <artificial>:(.text+0x1d9a6): undefined reference to `json_object_object_add'
/usr/bin/ld: <artificial>:(.text+0x1d9de): undefined reference to `json_object_object_add'
/usr/bin/ld: /tmp/ccf7MyUz.ltrans0.ltrans.o: in function `gen_srcfile':
<artificial>:(.text+0x1da00): undefined reference to `json_object_new_null'
/usr/bin/ld: <artificial>:(.text+0x1da07): undefined reference to `json_object_new_object'
/usr/bin/ld: <artificial>:(.text+0x1da35): undefined reference to `json_object_object_add'
/usr/bin/ld: <artificial>:(.text+0x1da5c): undefined reference to `json_object_object_add'
/usr/bin/ld: /tmp/ccf7MyUz.ltrans0.ltrans.o: in function `gen_ast_identifier':
<artificial>:(.text+0x1da7e): undefined reference to `json_object_new_null'
/usr/bin/ld: <artificial>:(.text+0x1da88): undefined reference to `json_object_new_object'
/usr/bin/ld: <artificial>:(.text+0x1dac0): undefined reference to `json_object_object_add'
/usr/bin/ld: <artificial>:(.text+0x1daf8): undefined reference to `json_object_object_add'
/usr/bin/ld: <artificial>:(.text+0x1db2e): undefined reference to `json_object_object_add'
/usr/bin/ld: <artificial>:(.text+0x1db65): undefined reference to `json_object_object_add'
/usr/bin/ld: /tmp/ccf7MyUz.ltrans0.ltrans.o: in function `gen_namespace_start':
<artificial>:(.text+0x1dbce): undefined reference to `json_object_new_object'
/usr/bin/ld: /tmp/ccf7MyUz.ltrans0.ltrans.o: in function `gen_ast_prog':
<artificial>:(.text+0x1dc2c): undefined reference to `json_object_new_object'
/usr/bin/ld: <artificial>:(.text+0x1dc61): undefined reference to `json_object_object_add'
/usr/bin/ld: <artificial>:(.text+0x1dc90): undefined reference to `json_object_object_add'
/usr/bin/ld: <artificial>:(.text+0x1dcc9): undefined reference to `json_object_object_add'
/usr/bin/ld: /tmp/ccf7MyUz.ltrans0.ltrans.o: in function `pkg_config':
<artificial>:(.text+0x293d7): undefined reference to `pkgconf_cross_personality_default'
/usr/bin/ld: <artificial>:(.text+0x29421): undefined reference to `pkgconf_client_new'
/usr/bin/ld: <artificial>:(.text+0x2942a): undefined reference to `pkgconf_cross_personality_default'
/usr/bin/ld: <artificial>:(.text+0x2943c): undefined reference to `pkgconf_client_dir_list_build'
/usr/bin/ld: <artificial>:(.text+0x29452): undefined reference to `pkgconf_pkg_find'
/usr/bin/ld: <artificial>:(.text+0x294b3): undefined reference to `pkgconf_pkg_libs'
/usr/bin/ld: <artificial>:(.text+0x294e8): undefined reference to `pkgconf_error'
/usr/bin/ld: <artificial>:(.text+0x295d9): undefined reference to `pkgconf_fragment_free'
/usr/bin/ld: <artificial>:(.text+0x295ec): undefined reference to `pkgconf_pkg_free'
/usr/bin/ld: <artificial>:(.text+0x295f8): undefined reference to `pkgconf_client_free'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:10: /home/ishimachi/Repositories/cspydr/build/bin/cspc] Error 1
make[1]: Leaving directory '/home/ishimachi/Repositories/cspydr/src/compiler'
make: *** [Makefile:25: cspc] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions