Closed fxprime closed 1 year ago
Hi @fxprime we are actively looking into this issue. Can you try build from the branch lm/gcc10
in the meantime and see if that solves your issue?
Hi @fxprime we are actively looking into this issue. Can you try build from the branch
lm/gcc10
in the meantime and see if that solves your issue?
Hi Thank you for your replied. I'm here anwser you while it's still building and it take longer time than i thought. Yes It's seem to fix the issue. I will let you know and close this issue after all unit tests pass. Thank you again. Cheers.
Due to memory constrain issued on Odroid N2+ , i can't finish the build without comment the test part out.
I do some test using this simeple cmake and cpp file
cmake_minimum_required(VERSION 3.15)
project (odroidn2pcmake)
set(CMAKE_CXX_STANDARD 17)
add_executable(odroidn2pcmake helloworld.cpp)
include_directories(/usr/local/include/ )
link_directories(/usr/local/lib/)
link_directories(/usr/local/bin/)
target_link_libraries(odroidn2pcmake cpprealm realm-object-store-dbg realm-sync-dbg realm-dbg realm-parser-dbg z curl uv ssl crypto pthread)
and this
#include <stdio.h>
#include <cpprealm/sdk.hpp>
#include <cpprealm/experimental/sdk.hpp>
namespace realm::experimental {
struct Todo {
primary_key<realm::object_id> _id{realm::object_id::generate()};
std::string name;
std::string status;
// The ownerId property stores the user.identifier() of a
// logged-in user. Omit this property for the non-sync example.
std::string ownerId;
};
REALM_SCHEMA(Todo, _id, name, status, ownerId);
}
int main() {
printf("Start testing\n");
auto app = realm::App("APP_ID");
realm::user mUser = app.login(realm::App::credentials::anonymous()).get();
auto userId = mUser.identifier();
auto realm = realm::experimental::db(mUser.flexible_sync_configuration());
auto subscriptions = realm.subscriptions();
auto updateSubscriptionSuccess = subscriptions.update([&](realm::mutable_sync_subscription_set &subs) {
subs.add<realm::experimental::Todo>("todos", [&userId](auto &obj) {
// For this example, get only Sync_Todo items where the ownerId
// property value is equal to the userId of the logged-in user.
return obj.ownerId == userId;
});
}).get();
realm.get_sync_session()->wait_for_download_completion().get();
realm.refresh();
printf("DD DD\n");
auto todos = realm.objects<realm::experimental::Todo>();
printf("Cur object = %d\n", todos.size());
if (todos.size() == 0) {
realm.write([&]() {
auto todoja = realm::experimental::Todo();
todoja._id = realm::object_id::generate();
todoja.name = "Espresso";
todoja.status = "NN";
auto managed_todoja = realm.add(std::move(todoja));
});
}
printf("CC CC\n");
return 0;
}
All seem work fine. So i'm happy to close this issue. I am grateful for your help. Thank you very much :)
Hi.
Can someone help me on this error please?
Involve libs version: cmake version 3.18.4 gcc version 10.2.1 20210110 (Debian 10.2.1-6)
Building with: Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye
Thank you advanced