Giter VIP home page Giter VIP logo

Comments (18)

waruqi avatar waruqi commented on August 27, 2024

try use moduleonly instead of static

add_rules("mode.release", "mode.debug")
set_languages("c++23")

-- Without the static library target, no errors occur
target("x-lib")
    set_kind("moduleonly")
    add_files("cpp/Math/**.mpp")

target("x-app")
    set_kind("binary")
    add_files("cpp/*.cpp")
    add_deps("x-lib")

from xmake.

paulross80 avatar paulross80 commented on August 27, 2024

Ok, for this minimal example project, it works. But for a bigger project that adds dependencies (libsdl, opengl, etc), everything compiles, but I got a lot of linker errors

$ xmake                                                                                                                      
generating config/x_config.hpp.in ... ok
generating config/app1_config.hpp.in ... ok
[  0%]: <app1> generating.module.deps cpp/apps/App1/app1.cpp
[  0%]: <app1> generating.module.deps cpp/x_lib/Math/Vector.mpp
[  0%]: <papa> generating.module.deps cpp/x_lib/Math/Vector.mpp
[  0%]: <app2> generating.module.deps cpp/apps/App2/app2.cpp
[  0%]: <app2> generating.module.deps cpp/x_lib/Math/Vector.mpp
[ 15%]: cache compiling.debug cpp/third_party/glad/glad.c
[ 20%]: archiving.debug libglad.a
[ 55%]: <app1> compiling.module.debug Vector
[ 60%]: <app2> compiling.module.debug Vector
[ 70%]: compiling.debug cpp/apps/App1/app1.cpp
[ 80%]: compiling.debug cpp/apps/App2/app2.cpp
[ 85%]: linking.debug app1_linux_x86_64-debug
error: /usr/bin/ld: /tmp/ccWpcfNw.ltrans0.ltrans.o: in function `std::vformat(std::basic_string_view<char, std::char_traits<char> >, std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<char>, char> >)':
/usr/include/c++/14/format:2773:(.text+0xb9a): undefined reference to `std::span<char, 18446744073709551615ul>::span<256ul>(char (&) [256ul]) [clone .localalias]'
/usr/bin/ld: /tmp/ccWpcfNw.ltrans0.ltrans.o: in function `std::vprint_nonunicode(_IO_FILE*, std::basic_string_view<char, std::char_traits<char> >, std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<char>, char> >)':
/usr/include/c++/14/format:2773:(.text+0xdbd): undefined reference to `std::span<char, 18446744073709551615ul>::span<256ul>(char (&) [256ul]) [clone .localalias]

And a lot of undefined references to SDL
undefined reference to `SDL_Init' ... etc

The target in the project:

target("glad")
    -- Static library
    set_kind("static")
    -- Add source files
    add_files("cpp/third_party/glad/glad.c")
    -- Add path to headers
    add_includedirs("cpp/third_party/glad", { public = true })

target("x")
    -- Static library
    set_kind("moduleonly") -- try use moduleonly instead of static
    set_suffixname("-static_$(plat)_$(arch)-$(mode)")
    add_files("cpp/papa_lib/**.mpp") -- "cpp/papa_lib/**.cpp", <- removed 1st param here

    set_version("0.0.1", { build = "%Y%m%d%H%M" })
    set_configdir("$(buildir)/config")
    add_configfiles("config/x_config.hpp.in")

    -- Link against the required libraries
    add_packages("libsdl")
    --add_packages("libsdl_mixer")
    add_packages("opengl")
    -- Add compiled glad library as a dependency
    add_deps("glad")
    --add_packages("openal-soft")
    --add_packages("zlib")

    -- Platform specific things
    -- if is_plat("linux", "macosx") then
        -- add_links("pthread", "m", "dl")
    -- end

    -- Add public include directories
    -- So the engine and apps can find engine headers
    add_includedirs("$(projectdir)/cpp", { public = true })
    -- So the engine and apps can also find the config headers
    add_includedirs("$(buildir)", { public = true })

Can C++20 modules be used to make a static library? I hope so
Running xmake -vD adds this output:

error: @programdir/core/main.lua:329: @programdir/actions/build/main.lua:148: @programdir/modules/async/runjobs.lua:322: @programdir/actions/build/kinds/binary.lua:53: @programdir/core/sandbox/modules/os.lua:378: execv(/usr/lib64/ccache/g++ -o build/linux/x86_64/debug/app1_linux_x86_64-debug build/.objs/app1/linux/x86_64/debug/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/debug/cpp/x_lib/Math/Vector.mpp.o -m64 -Lbuild/linux/x86_64/debug -lglad -flto -O0) failed(1)
stack traceback:
    [C]: in function 'error'
    [@programdir/core/base/os.lua:973]:
    [@programdir/core/sandbox/modules/os.lua:378]: in function 'execv'
    [@programdir/modules/core/tools/gcc.lua:580]:
    [C]: in function 'xpcall'
    [@programdir/core/base/utils.lua:275]:
    [@programdir/core/tool/linker.lua:221]: in function 'link'
    [@programdir/actions/build/kinds/binary.lua:53]: in function 'callback'
    [@programdir/modules/core/project/depend.lua:217]: in function 'on_changed'
    [@programdir/actions/build/kinds/binary.lua:41]: in function '_do_link_target'
    [@programdir/actions/build/kinds/binary.lua:83]:
    [@programdir/actions/build/kinds/binary.lua:110]: in function '_link_target'
    [@programdir/actions/build/kinds/binary.lua:138]: in function 'jobfunc'
    [@programdir/modules/async/runjobs.lua:238]:
    [C]: in function 'xpcall'
    [@programdir/core/base/utils.lua:275]: in function 'trycall'
    [@programdir/core/sandbox/modules/try.lua:117]: in function 'try'
    [@programdir/modules/async/runjobs.lua:220]: in function 'cotask'
    [@programdir/core/base/scheduler.lua:406]:

stack traceback:
        [C]: in function 'error'
        @programdir/core/base/os.lua:973: in function 'os.raiselevel'
        (...tail calls...)
        @programdir/core/main.lua:329: in upvalue 'cotask'
        @programdir/core/base/scheduler.lua:406: in function <@programdir/core/base/scheduler.lua:399>

from xmake.

waruqi avatar waruqi commented on August 27, 2024

Can C++20 modules be used to make a static library? I hope so

when only module files exsit, please use moduleonly. when both module/cpp or only cpp files exsit, please use static.

https://github.com/xmake-io/xmake/blob/master/tests/projects/c%2B%2B/static_library/xmake.lua

And I did not find add_requires in your xmake.lua

from xmake.

paulross80 avatar paulross80 commented on August 27, 2024

I've tried to make a minimal version of my project file, here it is the complete code

xmake.lua

set_project("something")
-- set_policy("build.optimization.lto", true) -- disabled now

-- Global settings
set_languages("c++23")
set_warnings("allextra")
set_exceptions("cxx")
set_encodings("utf-8")

-- Build modes
add_rules("mode.debug", "mode.release")

if is_mode("debug") then
    set_symbols("debug")
    set_optimize("none")
end

if is_mode("release") then
    set_symbols("hidden")
    set_strip("all")
    set_optimize("faster")
end

-- Install/fetch the required libraries
add_requires("libsdl")
add_requires("opengl")

-- glad target
target("glad")
    set_kind("static")
    add_files("cpp/third_party/glad/glad.c")
    add_includedirs("cpp/third_party/glad", { public = true })

-- target for my engine as a library
target("my_lib")
    set_kind("moduleonly")
    set_suffixname("-static_$(plat)_$(arch)-$(mode)")
    add_files("cpp/my_lib/**.mpp")
    set_version("0.0.1", { build = "%Y%m%d%H%M" })
    -- Link against the required libraries
    add_packages("libsdl")
    add_packages("opengl")
    add_deps("glad")
    -- Add public include directories
    -- So the engine and apps can find engine headers
    add_includedirs("$(projectdir)/cpp", { public = true })

-- Apps
target("app1")
    set_kind("binary")
    set_suffixname("_$(plat)_$(arch)-$(mode)")
    add_files("cpp/apps/App1/**.cpp")
    add_deps("my_lib")
    set_rundir("$(projectdir)/data/App1")
    set_version("0.1.2", { build = "%Y%m%d%H%M" })

target("app2")
    set_kind("binary")
    set_suffixname("_$(plat)_$(arch)-$(mode)")
    add_files("cpp/apps/App2/**.cpp")
    add_deps("my_lib")
    set_rundir("$(projectdir)/data/App2")
    set_version("0.2.5", { build = "%Y%m%d%H%M" })

Output is

$ xmake
[  0%]: <app1> generating.module.deps cpp/apps/App1/app1.cpp
[  0%]: <app1> generating.module.deps cpp/my_lib/Math/Vector.mpp
[  0%]: <my_lib> generating.module.deps cpp/my_lib/Math/Vector.mpp
[  0%]: <app2> generating.module.deps cpp/apps/App2/app2.cpp
[  0%]: <app2> generating.module.deps cpp/my_lib/Math/Vector.mpp
[ 15%]: cache compiling.debug cpp/third_party/glad/glad.c
[ 20%]: archiving.debug libglad.a
[ 55%]: <app1> compiling.module.debug Vector
[ 60%]: <app2> compiling.module.debug Vector
[ 70%]: compiling.debug cpp/apps/App1/app1.cpp
[ 80%]: compiling.debug cpp/apps/App2/app2.cpp
[ 85%]: linking.debug app1_linux_x86_64-debug
error: /usr/bin/ld: /tmp/ccSfvoo2.ltrans0.ltrans.o: in function `std::vformat(std::basic_string_view<char, std::char_traits<char> >, std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<char>, char> >)':

And a lot more of link errors
Using -vD parameter:

$ xmake -vD
error: @programdir/core/main.lua:329: @programdir/actions/build/main.lua:148: @programdir/modules/async/runjobs.lua:322: @programdir/actions/build/kinds/binary.lua:53: @programdir/core/sandbox/modules/os.lua:378: execv(/usr/lib64/ccache/g++ -o build/linux/x86_64/debug/app1_linux_x86_64-debug build/.objs/app1/linux/x86_64/debug/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/debug/cpp/my_lib/Math/Vector.mpp.o -m64 -Lbuild/linux/x86_64/debug -lglad -flto -O0) failed(1)
stack traceback:
    [C]: in function 'error'
    [@programdir/core/base/os.lua:973]:
    [@programdir/core/sandbox/modules/os.lua:378]: in function 'execv'
    [@programdir/modules/core/tools/gcc.lua:580]:
    [C]: in function 'xpcall'
    [@programdir/core/base/utils.lua:275]:
    [@programdir/core/tool/linker.lua:221]: in function 'link'
    [@programdir/actions/build/kinds/binary.lua:53]: in function 'callback'
    [@programdir/modules/core/project/depend.lua:217]: in function 'on_changed'
    [@programdir/actions/build/kinds/binary.lua:41]: in function '_do_link_target'
    [@programdir/actions/build/kinds/binary.lua:83]:
    [@programdir/actions/build/kinds/binary.lua:110]: in function '_link_target'
    [@programdir/actions/build/kinds/binary.lua:138]: in function 'jobfunc'
    [@programdir/modules/async/runjobs.lua:238]:
    [C]: in function 'xpcall'
    [@programdir/core/base/utils.lua:275]: in function 'trycall'
    [@programdir/core/sandbox/modules/try.lua:117]: in function 'try'
    [@programdir/modules/async/runjobs.lua:220]: in function 'cotask'
    [@programdir/core/base/scheduler.lua:406]:

stack traceback:
        [C]: in function 'error'
        @programdir/core/base/os.lua:973: in function 'base/os.raiselevel'
        (...tail calls...)
        @programdir/core/main.lua:329: in upvalue 'cotask'
        @programdir/core/base/scheduler.lua:406: in function <@programdir/core/base/scheduler.lua:399>

cpp/apps/App1/app1.cpp

#include <iostream>
using std::cout;
using std::endl;
#include <print>

#include <SDL2/SDL.h>
#include <glad/glad.h>

// Import my Vector module ?
import Vector;

int main()
{
    std::println(" - system RAM: {} GB", SDL_GetSystemRAM() / 1'000);

    // Testing my module!
    my_lib::Vector2f v1{ 2.5f, 3.1f };
    v1.print();

    // Initialize SDL
    if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) != 0)
    {
        //cout << "Error: " << SDL_GetError() << endl;
        std::println("Error: {}", SDL_GetError());
        return 1;
    }

    // Create a window
    SDL_Window* window = SDL_CreateWindow("App1",
                         SDL_WINDOWPOS_UNDEFINED,
                         SDL_WINDOWPOS_UNDEFINED,
                         1280, 720,
                         SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL);
    if (!window)
    {
        SDL_Quit();
        std::println("Error creating window: {}", SDL_GetError());
        return 1;
    }

    // Create OpenGL context
    auto context = SDL_GL_CreateContext(window);

    // Initialize the GLAD library
    // https://github.com/Dav1dde/glad
    auto glad_version = gladLoadGLLoader(SDL_GL_GetProcAddress);

    if (glad_version == 0)
    {
        SDL_GL_DeleteContext(context);
        SDL_DestroyWindow(window);
        SDL_Quit();
        cout << "Error initializing GLAD library!" << endl;
        return 1;
    }

    cout << " - glad library initialized" << endl;
    cout << " - Vendor: " << glGetString(GL_VENDOR) << endl;
    cout << " - Renderer: " << glGetString(GL_RENDERER) << endl;
    cout << " - Version: " << glGetString(GL_VERSION) << endl;

    // Loop
    bool close = false;

    while (!close)
    {
        SDL_Event event;

        while (SDL_PollEvent (&event))
        {
            if (event.type == SDL_QUIT)
                close = true;
        }

        // draw
        glClear(GL_COLOR_BUFFER_BIT);
        SDL_GL_SwapWindow(window);
    }

    // Destroy
    SDL_GL_DeleteContext(context);
    SDL_DestroyWindow(window);

    // Close SDL
    SDL_Quit();
    return 0;
}

cpp/apps/App2/app2.cpp

#include <iostream>
using std::cout;
using std::endl;

// Import my Vector module ?
import Vector;

int main()
{
    // Testing my module!
    my_lib::Vector2f v1{ 1.0f, -0.5f };
    v1.print();
    
    return 0;
}

cpp/my_lib/Math/Vector.mpp

module;
#include <cmath>
#include <print>

export module Vector;

export namespace my_lib
{

template <typename T>
struct Vector2D
{
    T x{}, y{};

    void print() const
    {
        std::println("Vector2: [{}, {}]", x, y);
    }
};

// Shortcuts to the most used ones
using Vector2f = Vector2D<float>;
using Vector2i = Vector2D<int>;

} 

Directory tree

.
├── build
│   └── linux
│       └── x86_64
│           ├── debug
│           │   └── libglad.a
├── cpp
│   ├── apps
│   │   ├── App1
│   │   │   └── app1.cpp
│   │   └── App2
│   │       └── app2.cpp
│   ├── my_lib
│   │   └── Math
│   │       └── Vector.mpp
│   └── third_party
│       └── glad
│           ├── glad
│           │   └── glad.h
│           ├── glad.c
│           └── KHR
│               └── khrplatform.h
└── xmake.lua

from xmake.

waruqi avatar waruqi commented on August 27, 2024

please provide a whole project. and try disable lto.

from xmake.

paulross80 avatar paulross80 commented on August 27, 2024

All the files should be listed in my previous post. And I have disabled LTO

$ xmake
[ 15%]: cache compiling.debug cpp/third_party/glad/glad.c
[ 20%]: archiving.debug libglad.a
[ 55%]: <app1> compiling.module.debug Vector
[ 60%]: <app2> compiling.module.debug Vector
[ 70%]: compiling.debug cpp/apps/App1/app1.cpp
[ 80%]: compiling.debug cpp/apps/App2/app2.cpp
[ 85%]: linking.debug app2_linux_x86_64-debug
[ 95%]: linking.debug app1_linux_x86_64-debug

Now the only thing the linker does not find is SDL functions

$ xmake -vD
error: @programdir/core/main.lua:329: @programdir/actions/build/main.lua:148: @programdir/modules/async/runjobs.lua:322: @programdir/actions/build/kinds/binary.lua:53: @programdir/core/sandbox/modules/os.lua:378: execv(/usr/lib64/ccache/g++ -o build/linux/x86_64/debug/app1_linux_x86_64-debug build/.objs/app1/linux/x86_64/debug/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/debug/cpp/my_lib/Math/Vector.mpp.o -m64 -Lbuild/linux/x86_64/debug -lglad) failed(1)
stack traceback:
    [C]: in function 'error'
    [@programdir/core/base/os.lua:973]:
    [@programdir/core/sandbox/modules/os.lua:378]: in function 'execv'
    [@programdir/modules/core/tools/gcc.lua:580]:
    [C]: in function 'xpcall'
    [@programdir/core/base/utils.lua:275]:
    [@programdir/core/tool/linker.lua:221]: in function 'link'
    [@programdir/actions/build/kinds/binary.lua:53]: in function 'callback'
    [@programdir/modules/core/project/depend.lua:217]: in function 'on_changed'
    [@programdir/actions/build/kinds/binary.lua:41]: in function '_do_link_target'
    [@programdir/actions/build/kinds/binary.lua:83]:
    [@programdir/actions/build/kinds/binary.lua:110]: in function '_link_target'
    [@programdir/actions/build/kinds/binary.lua:138]: in function 'jobfunc'
    [@programdir/modules/async/runjobs.lua:238]:
    [C]: in function 'xpcall'
    [@programdir/core/base/utils.lua:275]: in function 'trycall'
    [@programdir/core/sandbox/modules/try.lua:117]: in function 'try'
    [@programdir/modules/async/runjobs.lua:220]: in function 'cotask'
    [@programdir/core/base/scheduler.lua:406]:

stack traceback:
        [C]: in function 'error'
        @programdir/core/base/os.lua:973: in function 'os.raiselevel'
        (...tail calls...)
        @programdir/core/main.lua:329: in upvalue 'cotask'
        @programdir/core/base/scheduler.lua:406: in function <@programdir/core/base/scheduler.lua:399>

from xmake.

waruqi avatar waruqi commented on August 27, 2024

I need full projects and I don't have time to create them one by one.

from xmake.

paulross80 avatar paulross80 commented on August 27, 2024

Sorry. What do you mean by full project? a zip file? a public repo?

from xmake.

SirLynix avatar SirLynix commented on August 27, 2024

I think either would be fine, the idea is to be able to reproduce the bug in less than two minutes

from xmake.

waruqi avatar waruqi commented on August 27, 2024

Sorry. What do you mean by full project? a zip file? a public repo?

a zip file with your all project files, you can upload it as issue attachment

from xmake.

paulross80 avatar paulross80 commented on August 27, 2024

I see, thank you. Here is the project
template_module_not_found.zip

from xmake.

waruqi avatar waruqi commented on August 27, 2024

It works for me on my fedora/gcc.

$ xmake -rv
checking for flags (gcc_deps_format) ... ok
checking for flags (gcc_deps_file) ... ok
checking for flags (gcc_deps_output) ... ok
[  0%]: <app1> generating.module.deps cpp/apps/App1/app1.cpp
checking for flags (-fvisibility-inlines-hidden) ... ok
checking for flags (-O2) ... ok
checking for flags (-std=c++23) ... ok
checking for flags (-D_GLIBCXX_USE_CXX11_ABI=0) ... ok
checking for flags (-DNDEBUG) ... ok
/usr/bin/gcc -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -E -x c++ cpp/apps/App1/app1.cpp -MT build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/32ea7a34/app1.cpp.json -MD -MF build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/32ea7a34/app1.cpp.d -fdeps-format=p1689r5 -fdeps-file=build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/32ea7a34/app1.cpp.json -fdeps-target=build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o -o build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/32ea7a34/app1.cpp.i
[  0%]: <app1> generating.module.deps cpp/my_lib/Math/Vector.mpp
/usr/bin/gcc -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -E -x c++ cpp/my_lib/Math/Vector.mpp -MT build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/69159ac3/Vector.mpp.json -MD -MF build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/69159ac3/Vector.mpp.d -fdeps-format=p1689r5 -fdeps-file=build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/69159ac3/Vector.mpp.json -fdeps-target=build/.objs/app1/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -o build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/69159ac3/Vector.mpp.i
checking for flags (gcc_module_mapper) ... ok
[  0%]: <my_lib> generating.module.deps cpp/my_lib/Math/Vector.mpp
/usr/bin/gcc -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -E -x c++ cpp/my_lib/Math/Vector.mpp -MT build/.gens/my_lib/linux/x86_64/release/rules/bmi/cache/modules/62063509/Vector.mpp.json -MD -MF build/.gens/my_lib/linux/x86_64/release/rules/bmi/cache/modules/62063509/Vector.mpp.d -fdeps-format=p1689r5 -fdeps-file=build/.gens/my_lib/linux/x86_64/release/rules/bmi/cache/modules/62063509/Vector.mpp.json -fdeps-target=build/.objs/my_lib/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -o build/.gens/my_lib/linux/x86_64/release/rules/bmi/cache/modules/62063509/Vector.mpp.i
[  0%]: <app2> generating.module.deps cpp/apps/App2/app2.cpp
/usr/bin/gcc -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -E -x c++ cpp/apps/App2/app2.cpp -MT build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/a2e5a9c2/app2.cpp.json -MD -MF build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/a2e5a9c2/app2.cpp.d -fdeps-format=p1689r5 -fdeps-file=build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/a2e5a9c2/app2.cpp.json -fdeps-target=build/.objs/app2/linux/x86_64/release/cpp/apps/App2/app2.cpp.o -o build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/a2e5a9c2/app2.cpp.i
[  0%]: <app2> generating.module.deps cpp/my_lib/Math/Vector.mpp
/usr/bin/gcc -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -E -x c++ cpp/my_lib/Math/Vector.mpp -MT build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/b8076ef4/Vector.mpp.json -MD -MF build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/b8076ef4/Vector.mpp.d -fdeps-format=p1689r5 -fdeps-file=build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/b8076ef4/Vector.mpp.json -fdeps-target=build/.objs/app2/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -o build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/b8076ef4/Vector.mpp.i
checking for the c compiler (cc) ... gcc
checking for flags (-O2) ... ok
checking for flags (-DNDEBUG) ... ok
[ 15%]: cache compiling.release cpp/third_party/glad/glad.c
/usr/bin/gcc -c -m64 -fvisibility=hidden -Wall -Wextra -O2 -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -DNDEBUG -o build/.objs/glad/linux/x86_64/release/cpp/third_party/glad/glad.c.o cpp/third_party/glad/glad.c
checking for flags (-MMD -MF) ... ok
checking for ar ... /usr/bin/ar
checking for the static library archiver (ar) ... ar
[ 20%]: archiving.release libglad.a
/usr/bin/ar -cr build/linux/x86_64/release/libglad.a build/.objs/glad/linux/x86_64/release/cpp/third_party/glad/glad.c.o
checking for the c++ compiler (cxx) ... gcc
[ 55%]: <app1> compiling.module.release Vector
/usr/bin/gcc -c -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -fmodule-mapper=/tmp/.xmake995/240702/app1/cpp/my_lib/Math/Vector.mpp -x c++ -o build/.objs/app1/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o cpp/my_lib/Math/Vector.mpp
[ 60%]: <app2> compiling.module.release Vector
/usr/bin/gcc -c -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -fmodule-mapper=/tmp/.xmake995/240702/app2/cpp/my_lib/Math/Vector.mpp -x c++ -o build/.objs/app2/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o cpp/my_lib/Math/Vector.mpp
checking for flags (-fdiagnostics-color=always) ... ok
[ 70%]: compiling.release cpp/apps/App1/app1.cpp
/usr/bin/gcc -c -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -fmodule-mapper=/tmp/.xmake995/240702/app1/cpp/apps/App1/app1.cpp -o build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o cpp/apps/App1/app1.cpp
checking for flags (-MMD -MF) ... ok
[ 80%]: compiling.release cpp/apps/App2/app2.cpp
/usr/bin/gcc -c -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -fmodule-mapper=/tmp/.xmake995/240702/app2/cpp/apps/App2/app2.cpp -o build/.objs/app2/linux/x86_64/release/cpp/apps/App2/app2.cpp.o cpp/apps/App2/app2.cpp
checking for the linker (ld) ... g++
[ 85%]: linking.release app2_linux_x86_64-release
/usr/bin/g++ -o build/linux/x86_64/release/app2_linux_x86_64-release build/.objs/app2/linux/x86_64/release/cpp/apps/App2/app2.cpp.o build/.objs/app2/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -L/home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/lib -Lbuild/linux/x86_64/release -s -lSDL2main -lSDL2 -lglad -lpthread -ldl
[ 95%]: linking.release app1_linux_x86_64-release
/usr/bin/g++ -o build/linux/x86_64/release/app1_linux_x86_64-release build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -L/home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/lib -Lbuild/linux/x86_64/release -s -lSDL2main -lSDL2 -lglad -lpthread -ldl
[100%]: build ok, spent 24.113s

from xmake.

waruqi avatar waruqi commented on August 27, 2024

try

add_packages("libsdl", {public = true})

and

add_requires("libsdl", {system = false})

from xmake.

paulross80 avatar paulross80 commented on August 27, 2024

It doesn't work either way
Using add_packages("libsdl", {public = true})

$ xmake clean
$ xmake
[  0%]: <app1> generating.module.deps cpp/apps/App1/app1.cpp
[  0%]: <app1> generating.module.deps cpp/my_lib/Math/Vector.mpp
[  0%]: <my_lib> generating.module.deps cpp/my_lib/Math/Vector.mpp
[  0%]: <app2> generating.module.deps cpp/apps/App2/app2.cpp
[  0%]: <app2> generating.module.deps cpp/my_lib/Math/Vector.mpp
[ 15%]: cache compiling.release cpp/third_party/glad/glad.c
[ 20%]: archiving.release libglad.a
[ 55%]: <app1> compiling.module.release Vector
[ 60%]: <app2> compiling.module.release Vector
[ 70%]: compiling.release cpp/apps/App1/app1.cpp
[ 80%]: compiling.release cpp/apps/App2/app2.cpp
[ 85%]: linking.release app2_linux_x86_64-release
[ 95%]: linking.release app1_linux_x86_64-release
error: /usr/bin/ld: build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o: in function `main':
app1.cpp:(.text.startup+0xd): undefined reference to `SDL_GetSystemRAM'
/usr/bin/ld: app1.cpp:(.text.startup+0x95): undefined reference to `SDL_Init'
/usr/bin/ld: app1.cpp:(.text.startup+0xc2): undefined reference to `SDL_CreateWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0xd6): undefined reference to `SDL_GL_CreateContext'
/usr/bin/ld: app1.cpp:(.text.startup+0xdb): undefined reference to `SDL_GL_GetProcAddress'
/usr/bin/ld: app1.cpp:(.text.startup+0x109): undefined reference to `SDL_PollEvent'
/usr/bin/ld: app1.cpp:(.text.startup+0x124): undefined reference to `SDL_GL_SwapWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x139): undefined reference to `SDL_GL_DeleteContext'
/usr/bin/ld: app1.cpp:(.text.startup+0x141): undefined reference to `SDL_DestroyWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x146): undefined reference to `SDL_Quit'
/usr/bin/ld: app1.cpp:(.text.startup+0x16e): undefined reference to `SDL_GetError'
/usr/bin/ld: app1.cpp:(.text.startup+0x190): undefined reference to `SDL_GL_DeleteContext'
/usr/bin/ld: app1.cpp:(.text.startup+0x198): undefined reference to `SDL_DestroyWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x19d): undefined reference to `SDL_Quit'
/usr/bin/ld: app1.cpp:(.text.startup+0x1bb): undefined reference to `SDL_Quit'
collect2: error: ld returned 1 exit status

Using add_requires("libsdl", {system = false})

$ xmake clean
$ xmake
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
  -> expat 2.6.2 [from:wayland]
  -> wayland 1.23.0 [private, from:libsdl]
  -> libsdl 2.30.4 
please input: y (y/n/m)
y
  => download https://github.com/libexpat/libexpat/releases/download/R_2_6_2/expat-2.6.2.tar.bz2 .. ok
  => install expat 2.6.2 .. ok
  => download https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.23.0/downloads/wayland-1.23.0.tar.xz .. ok
  => install wayland 1.23.0 .. ok
  => download https://github.com/libsdl-org/SDL/releases/download/release-2.30.4/SDL2-2.30.4.zip .. ok
  => install libsdl 2.30.4 .. ok
[  0%]: <app1> generating.module.deps cpp/apps/App1/app1.cpp
[  0%]: <app1> generating.module.deps cpp/my_lib/Math/Vector.mpp
[  0%]: <my_lib> generating.module.deps cpp/my_lib/Math/Vector.mpp
[  0%]: <app2> generating.module.deps cpp/apps/App2/app2.cpp
[  0%]: <app2> generating.module.deps cpp/my_lib/Math/Vector.mpp
[ 15%]: cache compiling.release cpp/third_party/glad/glad.c
[ 20%]: archiving.release libglad.a
[ 55%]: <app1> compiling.module.release Vector
[ 60%]: <app2> compiling.module.release Vector
[ 70%]: compiling.release cpp/apps/App2/app2.cpp
[ 80%]: compiling.release cpp/apps/App1/app1.cpp
[ 85%]: linking.release app2_linux_x86_64-release
[ 95%]: linking.release app1_linux_x86_64-release
error: /usr/bin/ld: build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o: in function `main':
app1.cpp:(.text.startup+0xd): undefined reference to `SDL_GetSystemRAM'
/usr/bin/ld: app1.cpp:(.text.startup+0x95): undefined reference to `SDL_Init'
/usr/bin/ld: app1.cpp:(.text.startup+0xc2): undefined reference to `SDL_CreateWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0xd6): undefined reference to `SDL_GL_CreateContext'
/usr/bin/ld: app1.cpp:(.text.startup+0xdb): undefined reference to `SDL_GL_GetProcAddress'
/usr/bin/ld: app1.cpp:(.text.startup+0x109): undefined reference to `SDL_PollEvent'
/usr/bin/ld: app1.cpp:(.text.startup+0x124): undefined reference to `SDL_GL_SwapWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x139): undefined reference to `SDL_GL_DeleteContext'
/usr/bin/ld: app1.cpp:(.text.startup+0x141): undefined reference to `SDL_DestroyWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x146): undefined reference to `SDL_Quit'
/usr/bin/ld: app1.cpp:(.text.startup+0x16e): undefined reference to `SDL_GetError'
/usr/bin/ld: app1.cpp:(.text.startup+0x190): undefined reference to `SDL_GL_DeleteContext'
/usr/bin/ld: app1.cpp:(.text.startup+0x198): undefined reference to `SDL_DestroyWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x19d): undefined reference to `SDL_Quit'
/usr/bin/ld: app1.cpp:(.text.startup+0x1bb): undefined reference to `SDL_Quit'
collect2: error: ld returned 1 exit status
xmake -vD
[ 90%]: linking.release app1_linux_x86_64-release
/usr/lib64/ccache/g++ -o build/linux/x86_64/release/app1_linux_x86_64-release build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -Lbuild/linux/x86_64/release -s -lglad
/usr/bin/ld: build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o: in function `main':
app1.cpp:(.text.startup+0xd): undefined reference to `SDL_GetSystemRAM'
/usr/bin/ld: app1.cpp:(.text.startup+0x95): undefined reference to `SDL_Init'
/usr/bin/ld: app1.cpp:(.text.startup+0xc2): undefined reference to `SDL_CreateWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0xd6): undefined reference to `SDL_GL_CreateContext'
/usr/bin/ld: app1.cpp:(.text.startup+0xdb): undefined reference to `SDL_GL_GetProcAddress'
/usr/bin/ld: app1.cpp:(.text.startup+0x109): undefined reference to `SDL_PollEvent'
/usr/bin/ld: app1.cpp:(.text.startup+0x124): undefined reference to `SDL_GL_SwapWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x139): undefined reference to `SDL_GL_DeleteContext'
/usr/bin/ld: app1.cpp:(.text.startup+0x141): undefined reference to `SDL_DestroyWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x146): undefined reference to `SDL_Quit'
/usr/bin/ld: app1.cpp:(.text.startup+0x16e): undefined reference to `SDL_GetError'
/usr/bin/ld: app1.cpp:(.text.startup+0x190): undefined reference to `SDL_GL_DeleteContext'
/usr/bin/ld: app1.cpp:(.text.startup+0x198): undefined reference to `SDL_DestroyWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x19d): undefined reference to `SDL_Quit'
/usr/bin/ld: app1.cpp:(.text.startup+0x1bb): undefined reference to `SDL_Quit'
collect2: error: ld returned 1 exit status
error: @programdir/core/main.lua:329: @programdir/actions/build/main.lua:148: @programdir/modules/async/runjobs.lua:322: @programdir/actions/build/kinds/binary.lua:53: @programdir/core/sandbox/modules/os.lua:378: execv(/usr/lib64/ccache/g++ -o build/linux/x86_64/release/app1_linux_x86_64-release build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -Lbuild/linux/x86_64/release -s -lglad) failed(1)
stack traceback:
    [C]: in function 'error'
    [@programdir/core/base/os.lua:973]:
    [@programdir/core/sandbox/modules/os.lua:378]: in function 'execv'
    [@programdir/modules/core/tools/gcc.lua:580]:
    [C]: in function 'xpcall'
    [@programdir/core/base/utils.lua:275]:
    [@programdir/core/tool/linker.lua:221]: in function 'link'
    [@programdir/actions/build/kinds/binary.lua:53]: in function 'callback'
    [@programdir/modules/core/project/depend.lua:217]: in function 'on_changed'
    [@programdir/actions/build/kinds/binary.lua:41]: in function '_do_link_target'
    [@programdir/actions/build/kinds/binary.lua:83]:
    [@programdir/actions/build/kinds/binary.lua:110]: in function '_link_target'
    [@programdir/actions/build/kinds/binary.lua:138]: in function 'jobfunc'
    [@programdir/modules/async/runjobs.lua:238]:
    [C]: in function 'xpcall'
    [@programdir/core/base/utils.lua:275]: in function 'trycall'
    [@programdir/core/sandbox/modules/try.lua:117]: in function 'try'
    [@programdir/modules/async/runjobs.lua:220]: in function 'cotask'
    [@programdir/core/base/scheduler.lua:406]:

stack traceback:
        [C]: in function 'error'
        @programdir/core/base/os.lua:973: in function 'base/os.raiselevel'
        (...tail calls...)
        @programdir/core/main.lua:329: in upvalue 'cotask'
        @programdir/core/base/scheduler.lua:406: in function <@programdir/core/base/scheduler.lua:399>

from xmake.

waruqi avatar waruqi commented on August 27, 2024

my link logs:

/usr/bin/g++ -o build/linux/x86_64/release/app2_linux_x86_64-release build/.objs/app2/linux/x86_64/release/cpp/apps/App2/app2.cpp.o build/.objs/app2/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -L/home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/lib -Lbuild/linux/x86_64/release -s -lSDL2main -lSDL2 -lglad -lpthread -ldl

your link logs:

/usr/lib64/ccache/g++ -o build/linux/x86_64/release/app1_linux_x86_64-release build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -Lbuild/linux/x86_64/release -s -lglad

libsdl link is missing. I'm not sure if you're setting add_packages("libsdl", {public = true}) correctly, but it's working for me.

from xmake.

paulross80 avatar paulross80 commented on August 27, 2024

Ok. I had the add_packages("libsdl", {public = true}) part in the wrong place. Now it is under the library target
Linking is fine now:

[ 85%]: linking.release app2_linux_x86_64-release
/usr/lib64/ccache/g++ -o build/linux/x86_64/release/app2_linux_x86_64-release build/.objs/app2/linux/x86_64/release/cpp/apps/App2/app2.cpp.o build/.objs/app2/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -L/home/paul/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/lib -Lbuild/linux/x86_64/release -s -lSDL2main -lSDL2 -lglad -lpthread -ldl
[ 95%]: linking.release app1_linux_x86_64-release
/usr/lib64/ccache/g++ -o build/linux/x86_64/release/app1_linux_x86_64-release build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -L/home/paul/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/lib -Lbuild/linux/x86_64/release -s -lSDL2main -lSDL2 -lglad -lpthread -ldl

build cache stats:
cache directory: build/.build_cache
cache hit rate: 100%
cache hit: 1
cache hit total time: 0.001s
cache miss: 0
cache miss total time: 0.000s
new cached files: 0
remote cache hit: 0
remote new cached files: 0
preprocess failed: 0
compile fallback count: 0
compile total time: 0.000s

[100%]: build ok, spent 6.067s

But now xmake doesn' t run my apps. I can see the binaries are generated in the correct folders. File sizes look correct. Am I doing something wrong?

$ xmake run app1
error: cannot execv(/home/paul/Programming/xmake/post/build/linux/x86_64/release/app1_linux_x86_64-release ), No such file or directory
$ xmake run app2
error: cannot execv(/home/paul/Programming/xmake/post/build/linux/x86_64/release/app2_linux_x86_64-release ), No such file or directory

files

from xmake.

waruqi avatar waruqi commented on August 27, 2024

you can use lldb/gdb to debug it.

xmake f -m debug
xmake
xmake run -d app1

from xmake.

paulross80 avatar paulross80 commented on August 27, 2024

Thank you. In my original project, everything is working now

from xmake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.