Giter Club home page Giter Club logo

Comments (29)

Milerius avatar Milerius commented on May 19, 2024 1

ok great! thank's a lot for your help and patience @ddovod !

from jet-live.

Milerius avatar Milerius commented on May 19, 2024 1

Ok thank's @ddovod

I will try to solve the problem don't worry, I don't want to waste your time.

I'm adding some important dependancies to the project that I'm developing so you will not be able to compile easily like before.

I'm closing it for the moment, and I will try to use jet-live on Linux if needed.

For osx I think it's a good idea to integrate into the CI too so we can have a better view on it !

Thank's a lot !

from jet-live.

Milerius avatar Milerius commented on May 19, 2024

On linux, no reload happens for me, but there is no crash.

There is my compiler flags:

target_compile_options(antara_optimize_settings INTERFACE
        $<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Linux>>:-O0 -g>
        $<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Linux>>:-O3 -march=native -ffast-math>
        $<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Darwin>>:-O0 -g>
        $<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Darwin>>:-O3 -march=native -ffast-math>
        $<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:AppleClang>,$<PLATFORM_ID:Darwin>>:-O0 -g>
        $<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:AppleClang>,$<PLATFORM_ID:Darwin>>:-O3 -march=native -ffast-math>
        $<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Windows>,$<NOT:$<BOOL:${ClangCL}>>>:-O0 -g>
        $<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Windows>,$<NOT:$<BOOL:${ClangCL}>>>:-O3 -march=native -ffast-math>
        $<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Windows>,$<BOOL:${ClangCL}>>:/Zi /FS /DEBUG /Od /MDd /Oy->
        $<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Windows>,$<BOOL:${ClangCL}>>:/Ox -DNDEBUG>
        )

from jet-live.

ddovod avatar ddovod commented on May 19, 2024

Hi. Thanks for the report, the fix for macOS is on the go.
Could you please provide me with more info about your linux setup? Specifically how are you adding the library into your project CMakeLists.txt?

from jet-live.

Milerius avatar Milerius commented on May 19, 2024

Hey ! Yes

There is how I add your project:

if (UNIX AND ENABLE_CODE_RELOAD_UNIX)
FetchContent_Declare(
            jetlive
            URL https://github.com/ddovod/jet-live/archive/master.zip
    )
    target_compile_definitions(${PROJECT_NAME} PUBLIC -DENABLE_CODE_RELOAD_UNIX)
    FetchContent_GetProperties(jetlive)
    if (NOT jetlive_POPULATED)
        FetchContent_Populate(jetlive)
        include(${jetlive_SOURCE_DIR}/cmake/jet_live_setup.cmake) # setup needed compiler and linker flags, include this file in your root CMakeLists.txt
        set(JET_LIVE_BUILD_EXAMPLE OFF)
        set(JET_LIVE_SHARED ON)
        add_subdirectory(${jetlive_SOURCE_DIR} ${jetlive_BINARY_DIR} EXCLUDE_FROM_ALL)
        target_link_libraries(${PROJECT_NAME} PUBLIC jet-live)
    endif ()
endif ()

Same for both platform (OSX, Linux)

On Linux I enter in the function reload code, but just nothing happen

from jet-live.

Milerius avatar Milerius commented on May 19, 2024

Full CMake setup:

if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
    message(FATAL_ERROR "Prevented in-tree build. Please create a build directory outside of the source code and call cmake from there")
endif ()

##! Minimum version of the CMake.
cmake_minimum_required(VERSION 3.14)

##! C++ Standard needed by the SDK is 17
set(CMAKE_CXX_STANDARD 17)

##! Our Project title, here atomic-dex-desktop.
project(atomic-dex-desktop DESCRIPTION "An awesome atomic-dex-desktop" LANGUAGES CXX VERSION 1.0.0)

##! The SDK need's clang as main compiler.
if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
        message(FATAL_ERROR "Only Clang is supported (minimum LLVM 8.0)")
    endif ()
endif ()

##! We will let know the SDK if our on Linux
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
    set(LINUX TRUE)
endif ()

##! Options
option(ENABLE_CODE_RELOAD_UNIX "Use address sanitizer" OFF)

##! We include the module from CMake for fetching dependencies
include(FetchContent)

##! We declare information about the dependance that we want to fetch.
FetchContent_Declare(
        antara-gaming-sdk
        URL https://github.com/KomodoPlatform/antara-gaming-sdk/archive/master.zip

)

if (UNIX)
    FetchContent_Declare(
            jetlive
            URL https://github.com/ddovod/jet-live/archive/master.zip
    )
endif ()

##! We set extras modules from the SDK that we want to use, here we will use the SFML module.
set(USE_SFML_ANTARA_WRAPPER ON)
set(USE_IMGUI_ANTARA_WRAPPER ON)
set(ENABLE_BLOCKCHAIN_MODULES ON)

##! We fetch our dependence
if (APPLE)
    FetchContent_Declare(mm2
            URL http://195.201.0.6/mm2/mm2-latest-Darwin.zip)
elseif (LINUX)
    FetchContent_Declare(mm2
            URL http://195.201.0.6/mm2/mm2-latest-Linux.zip)
else ()
    FetchContent_Declare(mm2
            URL http://195.201.0.6/mm2/mm2-latest-Windows_NT.zip)
endif ()

FetchContent_Declare(jl777-coins
        URL https://github.com/jl777/coins/archive/master.zip)

FetchContent_MakeAvailable(mm2 jl777-coins)
##! Configure our needs.
if (UNIX)
    configure_file(${jl777-coins_SOURCE_DIR}/coins ${CMAKE_CURRENT_SOURCE_DIR}/assets/tools/mm2/coins.json COPYONLY)
    configure_file(${jl777-coins_SOURCE_DIR}/coins ${CMAKE_CURRENT_SOURCE_DIR}/assets/tools/mm2/coins COPYONLY)
    configure_file(${mm2_SOURCE_DIR}/mm2 ${CMAKE_CURRENT_SOURCE_DIR}/assets/tools/mm2/mm2 COPYONLY)
    file(COPY ${jl777-coins_SOURCE_DIR}/electrums DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/assets/tools/mm2/)
else ()
    configure_file(${jl777-coins_SOURCE_DIR}/coins ${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/assets/tools/mm2/coins.json COPYONLY)
    configure_file(${jl777-coins_SOURCE_DIR}/coins ${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/assets/tools/mm2/coins COPYONLY)
    configure_file(${mm2_SOURCE_DIR}/mm2.exe ${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/assets/tools/mm2/mm2.exe COPYONLY)
    file(COPY ${jl777-coins_SOURCE_DIR}/electrums DESTINATION ${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/assets/tools/mm2/)
endif ()

#FetchContent_MakeAvailable(antara-gaming-sdk)
FetchContent_GetProperties(antara-gaming-sdk)
if (NOT antara-gaming-sdk_POPULATED)
    FetchContent_Populate(antara-gaming-sdk)
    add_subdirectory(${antara-gaming-sdk_SOURCE_DIR} ${antara-gaming-sdk_BINARY_DIR} EXCLUDE_FROM_ALL)
endif ()

if (UNIX AND ENABLE_CODE_RELOAD_UNIX)
    target_compile_definitions(${PROJECT_NAME} PUBLIC -DENABLE_CODE_RELOAD_UNIX)
    FetchContent_GetProperties(jetlive)
    if (NOT jetlive_POPULATED)
        FetchContent_Populate(jetlive)
        include(${jetlive_SOURCE_DIR}/cmake/jet_live_setup.cmake) # setup needed compiler and linker flags, include this file in your root CMakeLists.txt
        set(JET_LIVE_BUILD_EXAMPLE OFF)
        set(JET_LIVE_SHARED ON)
        add_subdirectory(${jetlive_SOURCE_DIR} ${jetlive_BINARY_DIR} EXCLUDE_FROM_ALL)
        target_link_libraries(${PROJECT_NAME} PUBLIC jet-live)
    endif ()
endif ()

##! Calling this macros provided by the sdk will if you are on Apple init the environment for this OS (std::filesystem).
init_antara_env()

##! Get basis assets (default fonts, etc)
get_resources_basics_assets(${CMAKE_CURRENT_SOURCE_DIR})

##! Osx bundle icon
set(ICON)
configure_icon_osx(data/osx/kmd_logo.icns ICON kmd_logo.icns)

##! We create the executable with the project name
add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${ICON}
        atomic.dex.desktop.cpp
        src/atomic.dex.app.cpp
        src/atomic.dex.gui.cpp
        src/atomic.dex.mm2.cpp
        src/atomic.dex.gui.widgets.cpp
        src/atomic.dex.coins.config.cpp)

target_include_directories(${PROJECT_NAME} PUBLIC src)

##! Setting output directory
set_target_properties(${PROJECT_NAME}
        PROPERTIES
        RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
        )

magic_game_app_image_generation("${CMAKE_CURRENT_SOURCE_DIR}/data/linux"
        "org.antara.gaming.sfml.wolf3d.desktop"
        "org.antara.gaming.sfml.wolf3d.appdata.xml"
        "komodo_icon.png"
        atomic-dex-desktop
        AntaraAtomicDexAppDir
        ${CMAKE_CURRENT_SOURCE_DIR}/assets
        )

##! We link the SDK modules that we want to use to our executable
target_link_libraries(${PROJECT_NAME} PUBLIC antara::world antara::sfml reproc++ nlohmann_json::nlohmann_json antara::http_client)

##! Move assets
if (WIN32)
    file(COPY assets DESTINATION ${CMAKE_BINARY_DIR}/bin/)
    import_antara_dlls(${PROJECT_NAME})
endif ()

if (APPLE)
    ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
            COMMAND ${CMAKE_COMMAND} -E copy_directory "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks" "${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME}.app/Contents/Frameworks"
            COMMENT "copying frameworks …"
            $<TARGET_FILE_DIR:${PROJECT_NAME}>
            )
    file(COPY assets DESTINATION ${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME}.app/Contents/Resources)
    include(data/osx/sfml_atomicdex_install.cmake)
endif ()


target_enable_tsan(${PROJECT_NAME})

I manually verified the verbose output of the makefile and I can confirm that all the flags are set correctly on Linux and OSX

On Linux I'm using clang too.

from jet-live.

Milerius avatar Milerius commented on May 19, 2024

Capture d’écran 2019-12-05 à 19 29 00

Compile commands is present too.

from jet-live.

ddovod avatar ddovod commented on May 19, 2024

Could you please add the instance of this class

class ExampleListener : public jet::ILiveListener
{
public:
    void onLog(jet::LogSeverity severity, const std::string& message) override
    {
        std::string severityString;
        switch (severity) {
            case jet::LogSeverity::kDebug: severityString.append("[D]"); break;
            case jet::LogSeverity::kInfo: severityString.append("[I]"); break;
            case jet::LogSeverity::kWarning: severityString.append("[W]"); break;
            case jet::LogSeverity::kError: severityString.append("[E]"); break;
        }
        std::cout << severityString << ": " << message << std::endl;
    }
};

to the jet::Live like below:

auto live = jet::make_unique<jet::Live>(jet::make_unique<ExampleListener>());

and post the logs when you're trying to modify - save - reload the code?

from jet-live.

ddovod avatar ddovod commented on May 19, 2024

Just to clarify, are we talking about linux now?

from jet-live.

Milerius avatar Milerius commented on May 19, 2024

I have the same code on all platforms !

from jet-live.

Milerius avatar Milerius commented on May 19, 2024

Working on linux, with logs etc, was just taking time to recompile !

from jet-live.

ddovod avatar ddovod commented on May 19, 2024

Okay, sounds good.
So the issue now is only with macOS. In xcode11 some low level stuff has changed and I'm preparing a fix now. I hope to merge it to the master today, will let you know

from jet-live.

ddovod avatar ddovod commented on May 19, 2024

Merged. Closing this for now. Please feel free to reopen or create another issue if you'll face any troubles.
Good luck!

from jet-live.

Milerius avatar Milerius commented on May 19, 2024

@ddovod

Hey !

I'm sorry I think I still get some trouble:

/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/bin/atomic-dex-desktop.app/Contents/MacOS/atomic-dex-desktop
dyld: malformed mach-o image: __TEXT segment maps start of file but is writable

Process finished with exit code 6

from jet-live.

ddovod avatar ddovod commented on May 19, 2024

Oh, could you tell please, are you under macOS 10.15?

from jet-live.

Milerius avatar Milerius commented on May 19, 2024

yes i'am @ddovod

from jet-live.

ddovod avatar ddovod commented on May 19, 2024

Oh god, apple has broken so much things in 10.15.
Could you please try the version from the macos_10.15 branch? It works on my setup with macOS 10.15 and xcode 11.2.1, but I'm doing very dirty things to make it work, so I'm not sure it works on all kind of projects (however it should if you're not doing something very specific low level things with your executable). If it works fine on your side, I'll merge it to master and configure a ci build when travis-ci release 10.15 support.

from jet-live.

Milerius avatar Milerius commented on May 19, 2024

I will give a try please wait !

from jet-live.

Milerius avatar Milerius commented on May 19, 2024
2019-12-07 11:10:37.624 (  54.763s) [main thread     ]     atomic.dex.gui.cpp:229   INFO| .   Link command:
/Library/Developer/CommandLineTools/usr/bin/c++ -fPIC -shared -g -Wl,-image_base,0x1116ca000 -Wl,-export_dynamic -Wl,-install_name,lib_reload1.so -Wl,-flat_namespace -Wl,-rename_section,__TEXT,__text,__JET_TEXT,__text -Wl,-segprot,__JET_TEXT,rwx,rwx -undefined dynamic_lookup -o lib_reload1.so "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/SFWindow.m.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Texture.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/Joystick.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/Sleep.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/WindowImplCocoa.mm.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/Context.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/HIDInputManager.mm.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Color.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/WindowBase.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/GLExtensions.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/HIDJoystickManager.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/Err.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/Unix/SleepImpl.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/Unix/ThreadLocalImpl.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/Lock.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/String.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/VertexBuffer.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/Cursor.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/SFApplicationDelegate.m.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/Unix/MutexImpl.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/View.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/Time.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/Unix/ClockImpl.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Image.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/BlendMode.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/CMakeFiles/atomic-dex-desktop.dir/src/atomic.dex.gui.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Transformable.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/SFSilentResponder.m.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/GlResource.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/JoystickImpl.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/SFContext.mm.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/SFApplication.m.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/Window.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderTarget.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/ImageLoader.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/SFWindowController.mm.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/ThreadLocal.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Transform.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Sprite.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/SensorManager.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Vertex.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/JoystickManager.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Glsl.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/SFViewController.mm.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/Mutex.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/TextureSaver.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/CursorImpl.mm.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/AutoreleasePoolWrapper.mm.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/WindowImpl.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/VideoModeImpl.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/SensorImpl.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/cg_sf_conversion.mm.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Shader.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/VideoMode.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/cpp_objc_conversion.mm.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/GLCheck.cpp.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/SFKeyboardModifiersHelper.mm.o" "/Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/_deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/SFOpenGLView.mm.o" 
objc[40702]: Class SFWindow is implemented in both /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/bin/atomic-dex-desktop.app/Contents/MacOS/atomic-dex-desktop (0x1055c6da0) and /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/lib_reload1.so (0x1116e4a50). One of the two will be used. Which one is undefined.
objc[40702]: Class SFApplicationDelegate is implemented in both /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/bin/atomic-dex-desktop.app/Contents/MacOS/atomic-dex-desktop (0x1055c6cd8) and /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/lib_reload1.so (0x1116e4ac8). One of the two will be used. Which one is undefined.
objc[40702]: Class SFSilentResponder is implemented in both /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/bin/atomic-dex-desktop.app/Contents/MacOS/atomic-dex-desktop (0x1055c6d78) and /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/lib_reload1.so (0x1116e4b18). One of the two will be used. Which one is undefined.
objc[40702]: Class SFApplication is implemented in both /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/bin/atomic-dex-desktop.app/Contents/MacOS/atomic-dex-desktop (0x1055c6c60) and /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/lib_reload1.so (0x1116e4b40). One of the two will be used. Which one is undefined.
objc[40702]: Class SFBlackView is implemented in both /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/bin/atomic-dex-desktop.app/Contents/MacOS/atomic-dex-desktop (0x1055c6e18) and /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/lib_reload1.so (0x1116e4bb8). One of the two will be used. Which one is undefined.
objc[40702]: Class SFWindowController is implemented in both /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/bin/atomic-dex-desktop.app/Contents/MacOS/atomic-dex-desktop (0x1055c6e40) and /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/lib_reload1.so (0x1116e4be0). One of the two will be used. Which one is undefined.
objc[40702]: Class SFViewController is implemented in both /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/bin/atomic-dex-desktop.app/Contents/MacOS/atomic-dex-desktop (0x1055c6e90) and /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/lib_reload1.so (0x1116e4c30). One of the two will be used. Which one is undefined.
objc[40702]: Class SFOpenGLView is implemented in both /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/bin/atomic-dex-desktop.app/Contents/MacOS/atomic-dex-desktop (0x1055c6d00) and /Users/romanszterg/CLionProjects/atomicDEX-QT/cmake-build-debug/lib_reload1.so (0x1116e4c80). One of the two will be used. Which one is undefined.

Process finished with exit code 11

(At the moment of the code reload)

from jet-live.

Milerius avatar Milerius commented on May 19, 2024

(Something that I don't understand is that I didn't modified SFML related stuff on my code, I wonder why he try to recompile the whole SFML xD

from jet-live.

Milerius avatar Milerius commented on May 19, 2024

my SFML is linked statically

from jet-live.

ddovod avatar ddovod commented on May 19, 2024

Okay, can I try to play around with this project myself? Do you host it in public github repo?

from jet-live.

Milerius avatar Milerius commented on May 19, 2024

Yep ofc !

https://github.com/KomodoPlatform/atomicDEX-QT (there is no QT don't worry)

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_CODE_RELOAD_UNIX=ON ../
make -j2

Only clang and CMake 3.14 is required
No Dependencies is required, It's build on the fly

Code is in:

atomic.dex.gui.cpp for hot reload

from jet-live.

ddovod avatar ddovod commented on May 19, 2024

I've investigated it a bit and looks like the compiler and probably linker flags from jet_live_setup.cmake are not applied to the sfml, antara and other dep libraries, however for jet-live it is important, so probably you know how to correctly apply that flags to all c/cpp/mm files from all libraries? Probably it somehow connected to the way these libraries are added to the project, I haven't dig deeper

from jet-live.

Milerius avatar Milerius commented on May 19, 2024

Ok i will try to integrate it directly in the Antara SDK which handle every dependencies.

from jet-live.

ddovod avatar ddovod commented on May 19, 2024

Ok, good. As an indicator of correct configuration you can open compile_commands.json and check if all entries there contain -MD flag

from jet-live.

ddovod avatar ddovod commented on May 19, 2024

But anyway you said that it works fine on linux, right? If so, it sounds weird

from jet-live.

Milerius avatar Milerius commented on May 19, 2024

Yes it's work like a charm on Linux, because on linux jet live don't try to recompile the whole sfml when I modify the gui stuff

from jet-live.

ddovod avatar ddovod commented on May 19, 2024

I found one issue with sfml cmake configuration.
Macros.cmake:

    # if using gcc >= 4.0 or clang >= 3.0 on a non-Windows platform, we must hide public symbols by default
    # (exported ones are explicitly marked)
    if(NOT SFML_OS_WINDOWS AND ((SFML_COMPILER_GCC AND NOT SFML_GCC_VERSION VERSION_LESS "4") OR (SFML_COMPILER_CLANG AND NOT SFML_CLANG_VERSION VERSION_LESS "3")))
        set_target_properties(${target} PROPERTIES COMPILE_FLAGS -fvisibility=hidden)
    endif()

Reload doesn't work with hidden symbols. Without this option it doesn't recompile sfml when you're requesting code reload. But it crashes later, investigating

from jet-live.

Related Issues (18)

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.