Hi all! I love the idea of xdress and I've been trying to get past the learning curve. (Which might I say is surprisingly shallow.)
I've done some tweaking on the mypack tutorial project and I think I've gotten the basics down. Now I'm looking at using xdress in a bigger, real project.I've wanted to wrap two large C++ libraries (Bullet and Ogre) in Cython and I've had some success doing the wrapping by hand. As you can imagine, it's slow, monotonous work. Would xdress be suited to wrapping very large, object-oriented libraries such as those?
I've taken what I've learned from the xdress tutorial and tried applying it to both libraries and I can't seem to get past the error: "ERROR: Document is empty, line 1, column 1". Is there something obvious I'm missing?
I'll admit a great knowledge deficiency when it comes to C++ and compiling stuff... I usually just `make` and `make install`. I appreciate any help; xdress seems to be just the solution I'm looking for!
--/Thane Brimhall
You received this message because you are subscribed to the Google Groups "xdress" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/xdress/c01a8453-2a1a-4d21-ba70-c060c9dc31fb%40googlegroups.com.
Hi Anthony! Thanks for the prompt response. I'm starting with Bullet, because that's the smaller library with fewer dependencies. I've started a GitHub repo and pushed my code to it:https://github.com/pennomi/python-bulletI've made some changes that let me get farther than I could before. First, I removed the `src/` directory I was previously using and moved all source files up into the root directory where `xdressrc.py` lives. Now when I run `xdress` it avoids the "Document is empty" error. I believe what was causing those is that the included files were not correctly located (ie. if I changed one of the source files to `#include "src/foobar.h"` instead of `#include "foobar.h"` it seemed to alleviate the problem). It's possible I'm doing something wrong in my `xdressrc.py` file that was causing this. I'd prefer to have a dedicated `src/` directory, so any suggestions here?
Note that my `xdressrc.py` file scans the directory structure for *all* `.cpp` files,
excludes ones that can't/won't compile (ie. I'm on Linux, so no DX11 stuff), and then uses the autoscanning capabilities to handle all classes and functions in those files. This was the lazy way of doing things, and is probably what is causing my problem. I suppose I could manually go through the list of classes I want to wrap, but where's the fun in that? ;)
Now when I run `xdress`, it successfully scans all files, then I get an error that apparently was an issue some time ago, but was fixed:autodescribe: describing btKinematicCharacterControllerONLYIN = set(['f66'])ERROR: btKinematicCharacterController autodescribing failed: found class in '/home/thane/projects/bullet_xdress/BulletDynamics/Character/btKinematicCharacterController.h' ('f40') but expected it in '/home/thane/projects/bullet_xdress/BulletDynamics/Character/btKinematicCharacterController.cpp' ('f66').
Anyway, thanks for the prompt response! You've got a really cool project here and I feel like I'm really close to getting it work. Thank you!
/ThaneOn Tue, Mar 4, 2014 at 11:17 PM, Anthony Scopatz <sco...@gmail.com> wrote:
On Tue, Mar 4, 2014 at 9:38 AM, Thane Brimhall <thane.b...@gmail.com> wrote:
Hi all! I love the idea of xdress and I've been trying to get past the learning curve. (Which might I say is surprisingly shallow.)Hi Thane!Thanks for saying so! This means a lot.I've done some tweaking on the mypack tutorial project and I think I've gotten the basics down. Now I'm looking at using xdress in a bigger, real project.I've wanted to wrap two large C++ libraries (Bullet and Ogre) in Cython and I've had some success doing the wrapping by hand. As you can imagine, it's slow, monotonous work. Would xdress be suited to wrapping very large, object-oriented libraries such as those?Yes. This is why xdress was written. They may be some rough spots still. But hopefully we can help you get through those.I've taken what I've learned from the xdress tutorial and tried applying it to both libraries and I can't seem to get past the error: "ERROR: Document is empty, line 1, column 1". Is there something obvious I'm missing?
Do you have a repo that we can look at? Alternatively what is the xdressrc.py file you are using? I am actually not sure where this error is coming from. What is the output of "xdress --debug"?I'll admit a great knowledge deficiency when it comes to C++ and compiling stuff... I usually just `make` and `make install`. I appreciate any help; xdress seems to be just the solution I'm looking for!
Great! If you send us some of the info above, we should be able to help.Be WellAnthony--/Thane Brimhall
You received this message because you are subscribed to the Google Groups "xdress" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/xdress/c01a8453-2a1a-4d21-ba70-c060c9dc31fb%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "xdress" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/xdress/CAHeac5NfmX-xGV2p86dCOpcattQSyzJaJ%3D%2B%2B71xjaz3FKuH_MA%40mail.gmail.com.
Anthony,
I meant that i have the same problem of getting the same error message. My source files are in a src tree. A number of files went through well but just hit one class with this problem. I am working on windows. It seams to be a gccxml problem, but i need to figure that out.
I want to confirm with you that for each api that has a list of source files, e.g., .h and .cpp, xdress basically creates another .cpp to #include them and feed that file to the parser. After that, xdress does not directly feed individual files in the list to the parser, gccxml in my case. Please confirm my understanding.
If this is correct, then gccxml may not munipulate the path equally for all files.
Jinsuo
You received this message because you are subscribed to a topic in the Google Groups "xdress" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/xdress/CAPk-6T6h4VRxNytqXZjW%2BX9cbJX8eSuiEVFSVAmApQ_%2Bd%3D8Zwg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xdress/CAPk-6T78jOKQxsuPQmgjT1tLJdR5vA4Thp2KcGx_LZk6gxtoJg%40mail.gmail.com.
Anthony,This is awesome, now I've got my stuff working with a dedicated `src/` directory! Also, the pull request you submitted worked wonders on getting xdress further in analyzing the full source code. Now I've come to another error blocking me (as you know).ERROR: type of 'btAlignedObjectArray' could not be determinedFrom what I can tell, this means I wasn't properly wrapping one of the files I was supposed to. It turns out that the entire implementation of this file was in the `.h`; there is no `.cpp`. Obviously my code wouldn't work here because I wasn't wrapping any `.h` files directly. I've attempted to change this by explicitly adding that specific header file to the `xdressrc.py` configuration, as exhibited here: https://github.com/pennomi/python-bullet/blob/master/xdressrc.py#L31.This didn't seem to change anything, so I tried using xdress to wrap *just* that `.h` file. Here's the warning message I got:WARNING: RuntimeWarning: None of these files are present: set(['/home/thane/projects/bullet_xdress/src/LinearMath/btAlignedObjectArray.hxx', '/home/thane/projects/bullet_xdress/src/LinearMath/btAlignedObjectArray.h++', '/home/thane/projects/bullet_xdress/src/LinearMath/btAlignedObjectArray.hpp', '/home/thane/projects/bullet_xdress/src/LinearMath/btAlignedObjectArray.h']); autodescribing will probably fail.It seems xdress just ignored this file (maybe?), because I didn't see any `.pyx` files created. The warning also seems incorrect, because the file `/home/thane/projects/bullet_xdress/src/LinearMath/btAlignedObjectArray.h` actually *does* exist on my system. Unfortunately, I can't just ignore the files that need btAlignedObjectArray, because some of the fundamental classes of the library use it.
Thanks again for all your help on this. Let me know if there's anything I can do to help the xdress project in exchange (code, documentation, a donation, whatever).
To view this discussion on the web visit https://groups.google.com/d/msgid/xdress/CAHeac5NOfObF5iS63Fg69s3UG15suTgJPCgUHkz13zt-h%2BEhWA%40mail.gmail.com.
I'd attach my debug.txt file, but it's quite large. Instead, perhaps you could clone https://github.com/pennomi/python-bullet and run xdress instead.
The latest commits I made should reduce the debug file's output to less than 10 MB. (Before these changes that file was ~160 MB).
I really have no idea what's going on; all my theories are completely unfounded. Thanks for your help so far. It feels like I'm awfully close!
/Thane
--
You received this message because you are subscribed to the Google Groups "xdress" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/xdress/CAHeac5O-NCuCG%2BzwMDP5PmHKLb_kPYnV7Jaz468mDpVtP9vmMA%40mail.gmail.com.
Sorry for taking a while to get back to you. It has been a busy week at work :)
I can't seem to get past btAlignedObjectArray - which is where I believe where I was stuck before. Have you pushed back up to your repo? The last commit I see is from 2 days ago.
Yeah, the debug file is appended to each time xdress is run. It should probably just be overwritten. It is probably a 1 character change. Pull requests welcome :)
--
You received this message because you are subscribed to the Google Groups "xdress" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/xdress/CAHeac5NixuNVJEt47DtLg%3DfYP1Xxu%3D14e-1cj_0BK9Qew4rEaA%40mail.gmail.com.
What is the version of clang that you are using.
Maybe we can have a chat / hangout after hours (my time, Central) sometime next week?
Hi Anthony,What is the version of clang that you are using.
Ah, that might be the issue. I've been using gcc and gccxml for this. I seem to recall that one needed to have a special patched version of clang to work around some bugs in clang?
Maybe we can have a chat / hangout after hours (my time, Central) sometime next week?
Sounds great, I'm usually available any time after 7pm, Mountain time. (So that should be 8pm your time.) We can work out the details over mail/hangouts any time. Looking forward to working through this with you!
/ThaneOn Thu, Mar 13, 2014 at 11:05 AM, Thane Brimhall <thane.b...@gmail.com> wrote:
Hi Anthony,Sorry for taking a while to get back to you. It has been a busy week at work :)No problem! Work always comes first.I can't seem to get past btAlignedObjectArray - which is where I believe where I was stuck before. Have you pushed back up to your repo? The last commit I see is from 2 days ago.I've done a fresh clone of my repo and reinstalled xdress from master on GitHub into a fresh virtual environment and I still get the same result. Perhaps you just need to delete your build directory? It might have extra (unneeded) files in there based on my previous `xdressrc.py` attempts.Yeah, the debug file is appended to each time xdress is run. It should probably just be overwritten. It is probably a 1 character change. Pull requests welcome :)I've submitted a pull request with the debug file change you mentioned. (It was *2* characters, not one. The horror!)Thank you again for helping me through this./Thane--To view this discussion on the web visit https://groups.google.com/d/msgid/xdress/CAHeac5NixuNVJEt47DtLg%3DfYP1Xxu%3D14e-1cj_0BK9Qew4rEaA%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "xdress" group.
--
You received this message because you are subscribed to the Google Groups "xdress" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/xdress/CAHeac5NbPXmQtFuqbmZprGfafGO6RAxdbu0zEtYXUYgck63UUw%40mail.gmail.com.