-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows & wxWidgets platform #1569
Comments
Hey this looks great! 👏 Let's start with the Windows platform, I'll have more questions about wxWidgets I think. I just created a branch in this repo called Question about your build configuration: It looks like you have CMake searching for libCurl using |
Ok, here it is. As of curl, I've added it's path to CMAKE_PREFIX_PATH as findpackage uses it to find packages. :) |
So I did some work on wxWidgets support. https://github.com/tehKaiN/tangram-es/tree/platform-wxwidgets Perhaps it would be wise to just have DLL platform for use with any other framework/lib/whatever, but still linux/rpi platforms are more like app stubs to begin development with. wxtangram.cpp/.h implements wxTangram widget which inherits from wxGLCanvas widget. Main file containing app startup and widget usage is yet to be commited. This is still far from complete 'cuz many basic event handlers analogous to glfwApp are missing. Honestly, IDK if they should be included or externally implemented by devs, but I guess it's not really gonna be immutable and read-only map control implementation, but just app stub. |
So right now I'm trying to compile it using Windows ABI since I have to link my project with msvc-compiled DLLs. MSVC is too poor for compiling tangram-es, since it doesn't support many cpp features. Tested under build tools 2015 and 2017 (aka 14.0 and 14.1). My current approach is under llvm/clang 5.0. I can't really force CMake to use Also, css-color-parser dependency needed updating since latest commit fixes msvc builds with one missing I'm stuck at 76%. Right now stuff which is blocking me:
Any ideas & help would be appreciated ;) |
So I've traced some problem with clang (not msvc compatible clang-cl), which doesn't occur with g++:
Includes as follows:
|
Interesting, this error doesn't look familiar to me. It looks like you're compiling with What was the problem with MSVC? If possible I'd rather tweak our code to work with Microsoft's tools, since most Windows users would prefer that to Clang. |
Yup, tried with c++14, gnu++1y, gnu++1z, everything. C++17 makes some copy elision compulsory, which I thought will help clang, because there are lots of problems with returning by copy using private constructors - something that GCC optimizes away. You don't want to make this code compatible with MSVC - their compiler is rotten, has it's own quirks, oh and forget about variadic templates. Even MS bundles clang with their build tools so that one may use it for compiling too new projects. They bundle old version though (3.8, llvm.org has 5.0). I've spent 4 days trying to compile tangram-es using non-gcc so if you have any other questions - ask away, prob'ly been there. ;) |
Hello, I've tried to compile your code on 64bit Windows 7 using the following Mingw: http://mingw-w64.org/doku.php/download/mingw-builds I get a lot of the following error while building it:
Did you encounter anything like this while working on it? Thank you in advance! |
Hi there, My project needed rebuilding of tangram dependency, but my working branches became nasty. Since my last contributions I've learned a bit more about git, I've gave it another go - this time I'll rebase it on latest master periodically until it gets merged. Here's a branch based on most recent master. Sample app runs and I've even left a decent README with build instructions, but there's a problem - my app closes without any backtrace and error after 2s just in the middle of fetching fonts from the net - in the middle of urlClient logging, even if I enforce urlClient count to 1, thus it must be something else than curl. Any help would be appreciated. ;) BTW. Why ain't such popular OS still officially supported? |
@tehKaiN Can you please put a Pull Request for your work on this? It will be good to review it using github's review system. Thanks |
I've added #1812. |
So I've run it in gdb and this time I've added
So I get crash from this sceneLoader line: template <typename T>
struct as_if<T, void> {
explicit as_if(const Node& node_) : node(node_) {}
const Node& node;
T operator()() const {
if (!node.m_pNode)
throw TypedBadConversion<T>(node.Mark());
T t;
if (convert<T>::decode(node, t))
return t;
throw TypedBadConversion<T>(node.Mark()); // <---- HERE
}
}; all of that using master's scene.yaml generated into bin folder. EDIT: I've traced it to this point: layers:
touch:
data: { source: touch }
line:
filter: { type: line }
} else if (key == "all") {
f = generateAllFilter(node, scene);
} else {
f = generatePredicate(node, key); // <--- HERE, key = "type"
} |
@tehKaiN It's weird that tangram would be crashing at this point - as you can see from the line printed in the stack trace our code is explicitly |
I did a quick check with: #include <iostream>
int main(void) {
try {
throw(new std::exception());
}
catch(...) {
std::cout << "Catched" << std::endl;
}
return 0;
} and compiling using I don't clearly see exception type in my stacktrace, so perhaps exception is thrown but of other type? |
Okay, so exceptions support was a good trail. I've reinstalled mingw-w64 to i686-8.1.0-posix-sjlj-rt_v6-rev0 and it works - it looks like some kind of DWARF2 problem. I'm currently building by creating build/windows folder and calling cmake from there. I see that there's makefile in root dir, so I guess I should add windows support to it too? |
So I've added a bit of Windows support for main Makefile, but it made it ugly.
Another potential fix is to put notice in README.md that to successfully build you need linux cmd tools which come with MSYS2, Windows Ubuntu subsystem or are an optional install in git-scm. I guess such incompatibilities are one of the main reasons why CMake was invented. Perhaps it would be wise to scrap main makefile altogether and just instruct users to create build folder and call appropriate Apart from it, what else is required to merge it into master? Currently we have:
Also, I've noticed that linux platform uses fontconfig as source of system fonts, which is nonexistent on Windows. Currently Windows app uses hardcoded font names as Linux did before introducing fontconfig. Is it okay or does it need more work? |
I've dusted off my wxWidgets Tangram widget code - I'll create pull request after Windows gets merged. |
In relation to #1812 I'm syncing my code with latest stuff and I have it up and running, but I get crashes here and there. Is it me or does it look like label vector getting reallocated during sorting? ;) Have you stumbled upon something like that or have I caused it? EDIT: Nah, mutex haven't solved it. I've also tried do mitigate huge-ass numbers by putting some |
We have not touched |
Hi there,
I've ported tangram-es to Windows during this weekend and I'd like to contribute changes, but I'm not quite certain how I should do this.
Although I've tried to keep it clean as possible, some changes may be breaking for other platforms. Unfortunately I don't have environment to test other platforms, so I guess direct merge to master would be inappropriate 'cuz I won't be able to fix everything by myself.
My windows branch is here: https://github.com/tehKaiN/tangram-es/tree/platform-windows
Also, I'd like to create tangram-es wxWidgets widget. After it's done, should I contribute it later to this repo as additional platform or keep it on separate repo?
The text was updated successfully, but these errors were encountered: