Skip to content
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

Does not build on ubuntu #13

Closed
swardle opened this issue Feb 11, 2016 · 6 comments
Closed

Does not build on ubuntu #13

swardle opened this issue Feb 11, 2016 · 6 comments
Assignees

Comments

@swardle
Copy link
Contributor

swardle commented Feb 11, 2016

Hey Rob,

I was just playing around with a ubuntu virtualbox to test out some gcc work I was doing. Looks like EASTL does not build on it. Internally it must as we use it for servers and things so it should mostly just work.

Anyway I will try and fix and submit a patch.

[ 17%] Building CXX object packages/EAStdC/CMakeFiles/EAStdC.dir/source/EASprintf.cpp.o
In file included from /home/swardle/cpp/EASTL/test/packages/EAStdC/source/EASprintf.cpp:8:0:
/home/swardle/cpp/EASTL/test/packages/EAStdC/include/EAStdC/EASprintf.h: In function ‘int EA::StdC::Sprintf(T*, const T*, ...)’:
/home/swardle/cpp/EASTL/test/packages/EAStdC/include/EAStdC/EASprintf.h:30:7: error: ‘result’ does not name a type
  auto result = std::vsprintf(pDestination, pFormat, arguments);
       ^
/home/swardle/cpp/EASTL/test/packages/EAStdC/include/EAStdC/EASprintf.h:32:18: error: there are no arguments to ‘va_end’ that depend on a template parameter, so a declaration of ‘va_end’ must be available [-fpermissive]
  va_end(arguments);
                  ^
/home/swardle/cpp/EASTL/test/packages/EAStdC/include/EAStdC/EASprintf.h:32:18: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/swardle/cpp/EASTL/test/packages/EAStdC/include/EAStdC/EASprintf.h:34:9: error: ‘result’ was not declared in this scope
  return result;
         ^
/home/swardle/cpp/EASTL/test/packages/EAStdC/source/EASprintf.cpp: In function ‘int EA::StdC::Vsnprintf(wchar_t*, size_t, const wchar_t*, __va_list_tag*)’:
/home/swardle/cpp/EASTL/test/packages/EAStdC/source/EASprintf.cpp:23:16: error: redefinition of ‘int EA::StdC::Vsnprintf(wchar_t*, size_t, const wchar_t*, __va_list_tag*)’
 EASTDC_API int Vsnprintf(wchar_t* EA_RESTRICT pDestination, size_t n, const wchar_t* EA_RESTRICT pFormat, va_list arguments)
                ^
/home/swardle/cpp/EASTL/test/packages/EAStdC/source/EASprintf.cpp:20:16: error: ‘int EA::StdC::Vsnprintf(char32_t*, size_t, const char32_t*, __va_list_tag*)’ previously defined here
 EASTDC_API int Vsnprintf(char32_t* EA_RESTRICT pDestination, size_t n, const char32_t* EA_RESTRICT pFormat, va_list arguments)
                ^
/home/swardle/cpp/EASTL/test/packages/EAStdC/source/EASprintf.cpp:24:56: error: ‘vswprintf’ was not declared in this scope
  { return vswprintf(pDestination, n, pFormat, arguments); }
                                                        ^
make[2]: *** [packages/EAStdC/CMakeFiles/EAStdC.dir/source/EASprintf.cpp.o] Error 1
make[1]: *** [packages/EAStdC/CMakeFiles/EAStdC.dir/all] Error 2
make: *** [all] Error 2
[ 16%] Built target EASTL
@swardle swardle self-assigned this Feb 11, 2016
@swardle
Copy link
Contributor Author

swardle commented Feb 11, 2016

Ah I see the problem we are using a hacked up EAStdC boo. Not as portable as the real one. But these 2 compiler issues are easy to fix. EAThread and others might be a bit harder to get the tests to run. But I think I have a working EASTL lib now locally.

@rparolin
Copy link
Contributor

The higher level warnings are because the compiler isn't set into C++11 mode.
The cmake magic required to set all compilers into the correct mode is:
set (CMAKE_CXX_STANDARD 11)

I haven't had a chance to try it yet.

@swardle
Copy link
Contributor Author

swardle commented Feb 11, 2016

Ah could be for the first one. I just removed the auto. The next one is we have char32 and wchar at the same time.

Scott

On Feb 10, 2016, at 22:21, Rob Parolin notifications@github.com wrote:

The higher level warnings are because the compiler isn't set into C++11 mode.
The cmake magic required to set all compilers into the correct mode is:
set (CMAKE_CXX_STANDARD 11)

I haven't had a chance to try it yet.


Reply to this email directly or view it on GitHub.

@notverymoe
Copy link
Contributor

I had a go at fixing the compilation errors. Try applying this patch, it appears to work for me. The SetThreadPriority implementation probably isn't ideal but it appears to pass the tests. I haven't tested it on my windows computer yet (currently on holiday), though I doubt I broke anything too badly (Hopefully)

UbuntuCompilationFix.patch.zip

@rparolin
Copy link
Contributor

@Draghi I don't know if I can accept patch files because of the CLA requirement by EA legal. Can you please submit a pull request. Cheers.

@notverymoe
Copy link
Contributor

@rparolin No worries, I've submitted a pull request now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants