Thread: Need help with some compile/linkage issues

  1. #1
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    887

    Need help with some compile/linkage issues

    Basically I can't get the linker to link up some objects to the shared library at the end despite using the very flag it suggests
    Code:
    make --no-print-directory
    From https://github.com/stetre/moonglfw
       fd87fbb..63b48c2  master     -> origin/master
       fd87fbb..63b48c2  gh-pages   -> origin/gh-pages
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o gasp.c.o -c gasp.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/enums.c.o -c cloned/moonnuklear/src/enums.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/image.c.o -c cloned/moonnuklear/src/image.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/panel.c.o -c cloned/moonnuklear/src/panel.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/flags.c.o -c cloned/moonnuklear/src/flags.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/nuklear.c.o -c cloned/moonnuklear/src/nuklear.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/layout.c.o -c cloned/moonnuklear/src/layout.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/window.c.o -c cloned/moonnuklear/src/window.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/cursor.c.o -c cloned/moonnuklear/src/cursor.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/objects.c.o -c cloned/moonnuklear/src/objects.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/atlas.c.o -c cloned/moonnuklear/src/atlas.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/versions.c.o -c cloned/moonnuklear/src/versions.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/utils.c.o -c cloned/moonnuklear/src/utils.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/context.c.o -c cloned/moonnuklear/src/context.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/main.c.o -c cloned/moonnuklear/src/main.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/edit.c.o -c cloned/moonnuklear/src/edit.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/buffer.c.o -c cloned/moonnuklear/src/buffer.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/font.c.o -c cloned/moonnuklear/src/font.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/widgets.c.o -c cloned/moonnuklear/src/widgets.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/input.c.o -c cloned/moonnuklear/src/input.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/tracing.c.o -c cloned/moonnuklear/src/tracing.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/canvas.c.o -c cloned/moonnuklear/src/canvas.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/structs.c.o -c cloned/moonnuklear/src/structs.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/udata.c.o -c cloned/moonnuklear/src/udata.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonnuklear/src/style.c.o -c cloned/moonnuklear/src/style.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/enums.c.o -c cloned/moonglfw/src/enums.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/hint.c.o -c cloned/moonglfw/src/hint.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/window.c.o -c cloned/moonglfw/src/window.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/callbacks.c.o -c cloned/moonglfw/src/callbacks.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/vulkan.c.o -c cloned/moonglfw/src/vulkan.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/id.c.o -c cloned/moonglfw/src/id.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/monitor.c.o -c cloned/moonglfw/src/monitor.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/win.c.o -c cloned/moonglfw/src/win.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/mon.c.o -c cloned/moonglfw/src/mon.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/native.c.o -c cloned/moonglfw/src/native.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/context.c.o -c cloned/moonglfw/src/context.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/getproc.c.o -c cloned/moonglfw/src/getproc.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/main.c.o -c cloned/moonglfw/src/main.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/input.c.o -c cloned/moonglfw/src/input.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/cur.c.o -c cloned/moonglfw/src/cur.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moonglfw/src/utils.c.o -c cloned/moonglfw/src/utils.c
    cloned/moonglfw/src/utils.c:346:28: warning: declaration of 'struct timespec' will not be visible outside of this function [-Wvisibility]
    static void sectots(struct timespec *ts, double seconds)
                               ^
    cloned/moonglfw/src/utils.c:348:7: error: incomplete definition of type 'struct timespec'
        ts->tv_sec=(time_t)seconds;
        ~~^
    cloned/moonglfw/src/utils.c:346:28: note: forward declaration of 'struct timespec'
    static void sectots(struct timespec *ts, double seconds)
                               ^
    cloned/moonglfw/src/utils.c:349:7: error: incomplete definition of type 'struct timespec'
        ts->tv_nsec=(long)((seconds-((double)ts->tv_sec))*1.0e9);
        ~~^
    cloned/moonglfw/src/utils.c:346:28: note: forward declaration of 'struct timespec'
    static void sectots(struct timespec *ts, double seconds)
                               ^
    cloned/moonglfw/src/utils.c:349:44: error: incomplete definition of type 'struct timespec'
        ts->tv_nsec=(long)((seconds-((double)ts->tv_sec))*1.0e9);
                                             ~~^
    cloned/moonglfw/src/utils.c:346:28: note: forward declaration of 'struct timespec'
    static void sectots(struct timespec *ts, double seconds)
                               ^
    1 warning and 3 errors generated.
    make: [makefile:143: cloned/moonglfw/src/utils.c.o] Error 1 (ignored)
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/getuniform.c.o -c cloned/moongl/src/getuniform.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/pipeline.c.o -c cloned/moongl/src/pipeline.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/enums.c.o -c cloned/moongl/src/enums.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/getvertex.c.o -c cloned/moongl/src/getvertex.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/transform.c.o -c cloned/moongl/src/transform.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/query.c.o -c cloned/moongl/src/query.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/sync.c.o -c cloned/moongl/src/sync.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/renderbuffer.c.o -c cloned/moongl/src/renderbuffer.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/texture.c.o -c cloned/moongl/src/texture.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/perfragment.c.o -c cloned/moongl/src/perfragment.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/init.c.o -c cloned/moongl/src/init.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/framebuffer.c.o -c cloned/moongl/src/framebuffer.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/object.c.o -c cloned/moongl/src/object.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/nongl.c.o -c cloned/moongl/src/nongl.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/uniform.c.o -c cloned/moongl/src/uniform.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/subroutine.c.o -c cloned/moongl/src/subroutine.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/draw.c.o -c cloned/moongl/src/draw.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/bitfield.c.o -c cloned/moongl/src/bitfield.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/pixel.c.o -c cloned/moongl/src/pixel.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/utils.c.o -c cloned/moongl/src/utils.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/proginterface.c.o -c cloned/moongl/src/proginterface.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/sampler.c.o -c cloned/moongl/src/sampler.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/capabilities.c.o -c cloned/moongl/src/capabilities.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/vertex_array.c.o -c cloned/moongl/src/vertex_array.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/hint.c.o -c cloned/moongl/src/hint.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/main.c.o -c cloned/moongl/src/main.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/buffer.c.o -c cloned/moongl/src/buffer.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/getstring.c.o -c cloned/moongl/src/getstring.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/whole_framebuffer.c.o -c cloned/moongl/src/whole_framebuffer.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/program.c.o -c cloned/moongl/src/program.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/debug.c.o -c cloned/moongl/src/debug.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/teximage.c.o -c cloned/moongl/src/teximage.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/raster.c.o -c cloned/moongl/src/raster.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/getintformat.c.o -c cloned/moongl/src/getintformat.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/get.c.o -c cloned/moongl/src/get.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/func.c.o -c cloned/moongl/src/func.c
    cloned/moongl/src/func.c:87:18: warning: implicit declaration of function 'strnlen' is invalid in C99 [-Wimplicit-function-declaration]
        size_t len = strnlen(s, 256);
                     ^
    1 warning generated.
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/moongl/src/shader.c.o -c cloned/moongl/src/shader.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/ltable.c.o -c cloned/lua/ltable.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/liolib.c.o -c cloned/lua/liolib.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lmem.c.o -c cloned/lua/lmem.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lauxlib.c.o -c cloned/lua/lauxlib.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/ldebug.c.o -c cloned/lua/ldebug.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/ldo.c.o -c cloned/lua/ldo.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/loadlib.c.o -c cloned/lua/loadlib.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/linit.c.o -c cloned/lua/linit.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lmathlib.c.o -c cloned/lua/lmathlib.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lctype.c.o -c cloned/lua/lctype.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lstate.c.o -c cloned/lua/lstate.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lopcodes.c.o -c cloned/lua/lopcodes.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lstrlib.c.o -c cloned/lua/lstrlib.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/ltests.c.o -c cloned/lua/ltests.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/loslib.c.o -c cloned/lua/loslib.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lbaselib.c.o -c cloned/lua/lbaselib.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lutf8lib.c.o -c cloned/lua/lutf8lib.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lparser.c.o -c cloned/lua/lparser.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/llex.c.o -c cloned/lua/llex.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/ldblib.c.o -c cloned/lua/ldblib.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/ltablib.c.o -c cloned/lua/ltablib.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/ltm.c.o -c cloned/lua/ltm.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lstring.c.o -c cloned/lua/lstring.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lobject.c.o -c cloned/lua/lobject.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lvm.c.o -c cloned/lua/lvm.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lcode.c.o -c cloned/lua/lcode.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lundump.c.o -c cloned/lua/lundump.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lcorolib.c.o -c cloned/lua/lcorolib.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lapi.c.o -c cloned/lua/lapi.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lgc.c.o -c cloned/lua/lgc.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lzio.c.o -c cloned/lua/lzio.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/lfunc.c.o -c cloned/lua/lfunc.c
    clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -DLUAVER=5.3 -o cloned/lua/ldump.c.o -c cloned/lua/ldump.c
    clang -shared -fPIC -ldl -lm -L'.' -Wl,-rpath,'.' -o liblua.so cloned/lua/ltable.c.o cloned/lua/liolib.c.o cloned/lua/lmem.c.o cloned/lua/lauxlib.c.o cloned/lua/ldebug.c.o cloned/lua/ldo.c.o cloned/lua/loadlib.c.o cloned/lua/linit.c.o cloned/lua/lmathlib.c.o cloned/lua/lctype.c.o cloned/lua/lstate.c.o cloned/lua/lopcodes.c.o cloned/lua/lstrlib.c.o cloned/lua/ltests.c.o cloned/lua/loslib.c.o cloned/lua/lbaselib.c.o cloned/lua/lutf8lib.c.o cloned/lua/lparser.c.o cloned/lua/llex.c.o cloned/lua/ldblib.c.o cloned/lua/ltablib.c.o cloned/lua/ltm.c.o cloned/lua/lstring.c.o cloned/lua/lobject.c.o cloned/lua/lvm.c.o cloned/lua/lcode.c.o cloned/lua/lundump.c.o cloned/lua/lcorolib.c.o cloned/lua/lapi.c.o cloned/lua/lgc.c.o cloned/lua/lzio.c.o cloned/lua/lfunc.c.o cloned/lua/ldump.c.o
    clang -shared -fPIC -ldl -lm -L'.' -Wl,-rpath,'.' -llua -o libmoongl.so cloned/moongl/src/getuniform.c.o cloned/moongl/src/pipeline.c.o cloned/moongl/src/enums.c.o cloned/moongl/src/getvertex.c.o cloned/moongl/src/transform.c.o cloned/moongl/src/query.c.o cloned/moongl/src/sync.c.o cloned/moongl/src/renderbuffer.c.o cloned/moongl/src/texture.c.o cloned/moongl/src/perfragment.c.o cloned/moongl/src/init.c.o cloned/moongl/src/framebuffer.c.o cloned/moongl/src/object.c.o cloned/moongl/src/nongl.c.o cloned/moongl/src/uniform.c.o cloned/moongl/src/subroutine.c.o cloned/moongl/src/draw.c.o cloned/moongl/src/bitfield.c.o cloned/moongl/src/pixel.c.o cloned/moongl/src/utils.c.o cloned/moongl/src/proginterface.c.o cloned/moongl/src/sampler.c.o cloned/moongl/src/capabilities.c.o cloned/moongl/src/vertex_array.c.o cloned/moongl/src/hint.c.o cloned/moongl/src/main.c.o cloned/moongl/src/buffer.c.o cloned/moongl/src/getstring.c.o cloned/moongl/src/whole_framebuffer.c.o cloned/moongl/src/program.c.o cloned/moongl/src/debug.c.o cloned/moongl/src/teximage.c.o cloned/moongl/src/raster.c.o cloned/moongl/src/getintformat.c.o cloned/moongl/src/get.c.o cloned/moongl/src/func.c.o cloned/moongl/src/shader.c.o
    /usr/bin/ld: cloned/moongl/src/init.c.o: relocation R_X86_64_PC32 against symbol `moongl_version' can not be used when making a shared object; recompile with -fPIC
    /usr/bin/ld: final link failed: bad value
    clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [makefile:127: libmoongl.so] Error 1
    Compilation failed.
    I'm assuming that bit at the top means the repository was actually updated but feel free to correct me if I'm wrong, the bit that I'm drawing your attention to however is at the bottom,
    Code:
    /usr/bin/ld: cloned/moongl/src/init.c.o: relocation R_X86_64_PC32 against symbol `moongl_version' can not be used when making a shared object; recompile with -fPIC
    /usr/bin/ld: final link failed: bad value
    clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [makefile:127: libmoongl.so] Error 1
    Just in case someone was more interested in correcting me on the update bit, here's what I used:
    Code:
    clone=$(if $(wildcard $1),,$(shell cd $2 && git clone https://github.com/$3))
    update=$(shell cd $1 && git remote update)
    _fetch=$(shell cd $1 && git fetch $2)
    fetch=$(if $(call _fetch,$1,--dry-run),$(call _fetch,$1),)
    Edit: Forgot to add the bits that call the makefile functions I just mentioned
    Code:
    $(call mkdir,cloned)
    $(call clone,$(lua_dir),cloned,lua/lua)
    $(call clone,$(moongl_dir),cloned,stetre/moongl)
    $(call clone,$(moonglfw_dir),cloned,stetre/moonglfw)
    $(call clone,$(moonnuklear_dir),cloned,stetre/moonnuklear)
    $(call fetch,$(lua_dir))
    $(call fetch,$(moongl_dir))
    $(call fetch,$(moonglfw_dir))
    $(call fetch,$(moonnuklear_dir))
    Last edited by awsdert; 01-21-2020 at 12:32 PM.

  2. #2
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    887
    Never mind about the linkage issues, spotted the why of that, turned out I hadn't added the variable containing the flag to the compilation stage variable

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 03-24-2019, 01:21 AM
  2. compile issues
    By codecaine_21 in forum C Programming
    Replies: 31
    Last Post: 09-22-2010, 08:08 PM
  3. VS 2003 compile issues?
    By Dan911 in forum C++ Programming
    Replies: 4
    Last Post: 08-23-2005, 03:17 PM
  4. open scene graph compile issues
    By ichijoji in forum Game Programming
    Replies: 1
    Last Post: 08-04-2005, 12:31 PM
  5. Get sense of internal linkage and external linkage
    By gandalf_bar in forum C++ Programming
    Replies: 1
    Last Post: 10-14-2003, 05:57 AM

Tags for this Thread