Some minor problems and questions about the code [resolved]
Posted: 24 May 2012, 23:14
Hi,
I know I must be the only OS X user looking at Linwarrior so please bear with me a bit, some of the issues are really Apple's fault... I updated my system to Lion and a few new issues arose and I would like understand what you think of them and if you have any interest in working to solve them.
First thing: ALUT, not part of OpenAL implementation offered by Apple and freealut fails to properly compile, besides having some name/symbol collision with OpenAL 1.0 (at least that's what the docs I found on the issue say, can anyone confirm that this is [still] a problem?). Since linwarrior uses ALUT and some things that are not available in current macs I had to resort to a unofficial, generously offered, obscure and temporary build that I found in Flight Gear's forums.
Question: Is there an alternative that is multiplatform and can be implemented to replace ALUT?
Second: New C++ features are great but keeping up with compiler versions and finding compiler versions for new C++ features is not nice . Some of the code uses the new C++11 ranged for loop that currently GCC 4.6 has but it means yet another compiler from macports installed in the system. This is not really an issue but are there any more such "new" features? I've so far found only the ranged for loop but can't install GCC 4.6 yet to compile the code.
Last: 32bit VS 64bit. OS X is 64bit by default since Snow Leopard but it gets harder to maintain both 32 and 64bit software and having to always compile under 32bit is something I would like to avoid. Currently there are a few casts that will cause compiling errors/warnings since they are not 64bit ware. Like casting the Thread object to int in the hashCode method of the Thread class. I don't really know how to solve this with minimal effort and am still investigating the possible solutions. For the moment I added the -m32 flag to the compiler flags Doesn't work since some of Apple provided libs are 64bit only.
What are your plans for the development? I understand this is a project to develop in your spare time but are you only working towards GNU Linux/MS WIndows support or supporting other platforms is also an option?
Edit:
After a few tests I managed to compile the code but it crashes randomly with memory access violations that I can't seem to track. I spend several minutes trying to figure out where the crash occurred but it's not always in the same place so I suspect that some thread is crashing maybe due to the difference in int sizes and pointer sizes. I removed the optimizations and added the debug flag but step-by-step execution provided no real info so far.
Regards,
Knitter
I know I must be the only OS X user looking at Linwarrior so please bear with me a bit, some of the issues are really Apple's fault... I updated my system to Lion and a few new issues arose and I would like understand what you think of them and if you have any interest in working to solve them.
First thing: ALUT, not part of OpenAL implementation offered by Apple and freealut fails to properly compile, besides having some name/symbol collision with OpenAL 1.0 (at least that's what the docs I found on the issue say, can anyone confirm that this is [still] a problem?). Since linwarrior uses ALUT and some things that are not available in current macs I had to resort to a unofficial, generously offered, obscure and temporary build that I found in Flight Gear's forums.
Question: Is there an alternative that is multiplatform and can be implemented to replace ALUT?
Second: New C++ features are great but keeping up with compiler versions and finding compiler versions for new C++ features is not nice . Some of the code uses the new C++11 ranged for loop that currently GCC 4.6 has but it means yet another compiler from macports installed in the system. This is not really an issue but are there any more such "new" features? I've so far found only the ranged for loop but can't install GCC 4.6 yet to compile the code.
Last: 32bit VS 64bit. OS X is 64bit by default since Snow Leopard but it gets harder to maintain both 32 and 64bit software and having to always compile under 32bit is something I would like to avoid. Currently there are a few casts that will cause compiling errors/warnings since they are not 64bit ware. Like casting the Thread object to int in the hashCode method of the Thread class. I don't really know how to solve this with minimal effort and am still investigating the possible solutions. For the moment I added the -m32 flag to the compiler flags Doesn't work since some of Apple provided libs are 64bit only.
What are your plans for the development? I understand this is a project to develop in your spare time but are you only working towards GNU Linux/MS WIndows support or supporting other platforms is also an option?
Edit:
After a few tests I managed to compile the code but it crashes randomly with memory access violations that I can't seem to track. I spend several minutes trying to figure out where the crash occurred but it's not always in the same place so I suspect that some thread is crashing maybe due to the difference in int sizes and pointer sizes. I removed the optimizations and added the debug flag but step-by-step execution provided no real info so far.
Regards,
Knitter