Build error 2: call of overloaded ‘LittleShort(int)... (PPC)

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
caseyac
Posts: 4
Joined: Fri Jan 19, 2018 4:40 pm

Build error 2: call of overloaded ‘LittleShort(int)... (PPC)

Post by caseyac »

Similar to bug described at viewtopic.php?f=7&t=59164. The listed commit fixed that error. Now encountering the below build error on the same build system, PowerPC e5500 based (A-eon Cyrus Plus) running Ubuntu 16.4.3 LTS:

[ 78%] Building CXX object src/CMakeFiles/zdoom.dir/resourcefiles/file_zip.cpp.o
/home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_wad.cpp: In member function ‘void FWadFile::SkinHack()’:
/home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_wad.cpp:597:19: warning: comparison is always true due to limited range of data type [-Wtype-limits]
lump->Name[5] >= '\0')
^
/home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_wad.cpp:603:19: warning: comparison is always true due to limited range of data type [-Wtype-limits]
lump->Name[4] >= '\0'))
^
/home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp: In function ‘void time_to_dos(tm*, short unsigned int*, short unsigned int*)’:
/home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:528:94: error: call of overloaded ‘LittleShort(int)’ is ambiguous
tleShort((time->tm_year - 80) * 512 + (time->tm_mon + 1) * 32 + time->tm_mday);
^
In file included from /home/casey/gzdoom_build/gzdoom/src/./files.h:43:0,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/resourcefile.h:6,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.h:4,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:37:
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:84:14: note: candidate: short int LittleShort(short int)
inline short LittleShort (short x)
^
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:89:23: note: candidate: short unsigned int LittleShort(short unsigned int)
inline unsigned short LittleShort (unsigned short x)
^
/home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:529:85: error: call of overloaded ‘LittleShort(int)’ is ambiguous
ime = LittleShort(time->tm_hour * 2048 + time->tm_min * 32 + time->tm_sec / 2);
^
In file included from /home/casey/gzdoom_build/gzdoom/src/./files.h:43:0,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/resourcefile.h:6,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.h:4,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:37:
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:84:14: note: candidate: short int LittleShort(short int)
inline short LittleShort (short x)
^
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:89:23: note: candidate: short unsigned int LittleShort(short unsigned int)
inline unsigned short LittleShort (unsigned short x)
^
/home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp: In function ‘int AppendToZip(FileWriter*, const char*, FCompressedBuffer&, uint16_t, uint16_t)’:
/home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:553:65: error: call of overloaded ‘LittleShort(int)’ is ambiguous
local.Flags = content.mMethod == METHOD_DEFLATE ? LittleShort(2) : LittleShort
^
In file included from /home/casey/gzdoom_build/gzdoom/src/./files.h:43:0,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/resourcefile.h:6,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.h:4,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:37:
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:84:14: note: candidate: short int LittleShort(short int)
inline short LittleShort (short x)
^
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:89:23: note: candidate: short unsigned int LittleShort(short unsigned int)
inline unsigned short LittleShort (unsigned short x)
^
/home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:554:44: error: call of overloaded ‘LittleShort(int&)’ is ambiguous
local.Method = LittleShort(content.mMethod);
^
In file included from /home/casey/gzdoom_build/gzdoom/src/./files.h:43:0,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/resourcefile.h:6,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.h:4,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:37:
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:84:14: note: candidate: short int LittleShort(short int)
inline short LittleShort (short x)
^
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:89:23: note: candidate: short unsigned int LittleShort(short unsigned int)
inline unsigned short LittleShort (unsigned short x)
^
/home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp: In function ‘int AppendCentralDirectory(FileWriter*, const char*, FCompressedBuffer&, uint16_t, uint16_t, int)’:
/home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:595:63: error: call of overloaded ‘LittleShort(int)’ is ambiguous
dir.Flags = content.mMethod == METHOD_DEFLATE ? LittleShort(2) : LittleShort((
^
In file included from /home/casey/gzdoom_build/gzdoom/src/./files.h:43:0,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/resourcefile.h:6,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.h:4,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:37:
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:84:14: note: candidate: short int LittleShort(short int)
inline short LittleShort (short x)
^
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:89:23: note: candidate: short unsigned int LittleShort(short unsigned int)
inline unsigned short LittleShort (unsigned short x)
^
/home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:596:42: error: call of overloaded ‘LittleShort(int&)’ is ambiguous
dir.Method = LittleShort(content.mMethod);
^
In file included from /home/casey/gzdoom_build/gzdoom/src/./files.h:43:0,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/resourcefile.h:6,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.h:4,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:37:
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:84:14: note: candidate: short int LittleShort(short int)
inline short LittleShort (short x)
^
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:89:23: note: candidate: short unsigned int LittleShort(short unsigned int)
inline unsigned short LittleShort (unsigned short x)
^
/home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp: In function ‘bool WriteZip(const char*, TArray<FString>&, TArray<FCompressedBuffer>&)’:
/home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:663:81: error: call of overloaded ‘LittleShort(unsigned int)’ is ambiguous
irend.NumEntriesOnAllDisks = dirend.NumEntries = LittleShort(filenames.Size());
^
In file included from /home/casey/gzdoom_build/gzdoom/src/./files.h:43:0,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/resourcefile.h:6,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.h:4,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:37:
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:84:14: note: candidate: short int LittleShort(short int)
inline short LittleShort (short x)
^
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:89:23: note: candidate: short unsigned int LittleShort(short unsigned int)
inline unsigned short LittleShort (unsigned short x)
^
/home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:665:55: error: call of overloaded ‘LittleLong(long int)’ is ambiguous
dirend.DirectorySize = LittleLong(f->Tell() - dirofs);
^
In file included from /home/casey/gzdoom_build/gzdoom/src/./files.h:43:0,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/resourcefile.h:6,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.h:4,
from /home/casey/gzdoom_build/gzdoom/src/resourcefiles/file_zip.cpp:37:
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:95:21: note: candidate: unsigned int LittleLong(unsigned int)
inline unsigned int LittleLong (unsigned int x)
^
/home/casey/gzdoom_build/gzdoom/src/./m_swap.h:104:12: note: candidate: int LittleLong(int)
inline int LittleLong (int x)
^
src/CMakeFiles/zdoom.dir/build.make:6828: recipe for target 'src/CMakeFiles/zdoom.dir/resourcefiles/file_zip.cpp.o' failed
make[2]: *** [src/CMakeFiles/zdoom.dir/resourcefiles/file_zip.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:844: recipe for target 'src/CMakeFiles/zdoom.dir/all' failed
make[1]: *** [src/CMakeFiles/zdoom.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
casey@UTOPIA-DEV:~/gzdoom_build/gzdoom/build$

Thanks for your assistance!
caseyac
Posts: 4
Joined: Fri Jan 19, 2018 4:40 pm

Re: Build error 2: call of overloaded ‘LittleShort(int)... (

Post by caseyac »

Apologies for not making the subject more unique, but this isn't a duplicate. It is a similar but different error occurring at a different point in the compile process.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Build error 2: call of overloaded ‘LittleShort(int)... (

Post by _mental_ »

Is it the default GCC 5.3.1? I never tried on Linux but on PowerPC Mac it built GZDoom just fine until its support was dropped. Code responsible for these errors was there before that.
Sorry but playing with a crosscompiler is out of my interests at the moment. Maybe later.
caseyac
Posts: 4
Joined: Fri Jan 19, 2018 4:40 pm

Re: Build error 2: call of overloaded ‘LittleShort(int)... (

Post by caseyac »

I used GCC 5.4.0 from Ubuntu Xenial Updates. I also tried GCC 4.8.5 but it failed almost right away, I didn't bother to copy the error. Thanks for giving it a look. If you think of anything else I could try please let me know.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Build error 2: call of overloaded ‘LittleShort(int)... (

Post by _mental_ »

Should be fixed in 1b4e3d3.

GCC 4.9 is the oldest version that can build GZDoom.
caseyac
Posts: 4
Joined: Fri Jan 19, 2018 4:40 pm

Re: Build error 2: call of overloaded ‘LittleShort(int)... (

Post by caseyac »

YES! Builds and works perfectly! Many thanks! :D
Post Reply

Return to “Closed Bugs [GZDoom]”