Zandronum Chat @ irc.zandronum.com
#zandronum
Get the latest version: 3.0
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003530Zandronum[All Projects] Bugpublic2018-10-03 14:132018-10-17 23:58
ReporterEdward-san 
Assigned ToTorr Samaho 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
PlatformApple MacOSOSXOS Version10.13
Product Version3.1-beta 
Target VersionFixed in Version 
Summary0003530: Various compilation errors with Xcode 10
DescriptionWhile I was compiling zandronum-stable on OSX High Sierra with the tools from XCode 10, I got these errors:

1)

FAILED: src/CMakeFiles/zdoom.dir/textures/jpegtexture.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DDISABLE_SSE -DDYN_FLUIDSYNTH -DHAVE_FLUIDSYNTH -DNEED_STRUPR=1 -DNOASM -DNO_GTK=1 -DNO_SERVER_GUI=1 -D__forceinline=inline -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -I/usr/local/include/SDL -I"/Developer/FMOD Programmers API Mac/api/inc" -I../lzma/C -I/usr/local/include -I/usr/local/Cellar/openssl/1.0.2o_2/include -Isrc -I../src/. -I../src/g_doom -I../src/g_heretic -I../src/g_hexen -I../src/g_raven -I../src/g_strife -I../src/g_shared -I../src/huffman -I../src/Linux -I../src/oplsynth -I../src/sound -I../src/textures -I../src/thingdef -I../src/timidity -I../src/xlat -I../src/../gdtoa -I../src/../dumb/include -I../src/../sqlite -I../src/../upnpnat -Igdtoa -I../src/sdl -I. -stdlib=libc++ -std=c++14 -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers -Wno-inconsistent-missing-override -fno-rtti -fomit-frame-pointer -O3 -DNDEBUG -MD -MT src/CMakeFiles/zdoom.dir/textures/jpegtexture.o -MF src/CMakeFiles/zdoom.dir/textures/jpegtexture.o.d -o src/CMakeFiles/zdoom.dir/textures/jpegtexture.o -c ../src/textures/jpegtexture.cpp
../src/textures/jpegtexture.cpp:96:9: error: cannot initialize return object of type 'boolean' with an rvalue of type 'int'
        return TRUE;
               ^~~~
/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:164:18: note: expanded from macro 'TRUE'
    #define TRUE 1
                        ^
../src/textures/jpegtexture.cpp:385:3: error: no matching function for call to 'jpeg_read_header'
                jpeg_read_header(&cinfo, TRUE);
                ^~~~~~~~~~~~~~~~
/usr/local/include/jpeglib.h:1039:13: note: candidate function not viable: no known conversion from 'int' to 'boolean' for 2nd argument
EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
            ^
../src/textures/jpegtexture.cpp:487:3: error: no matching function for call to 'jpeg_read_header'
                jpeg_read_header(&cinfo, TRUE);
                ^~~~~~~~~~~~~~~~
/usr/local/include/jpeglib.h:1039:13: note: candidate function not viable: no known conversion from 'int' to 'boolean' for 2nd argument
EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
            ^
3 errors generated.


2)

[5/12] Building CXX object src/CMakeFiles/zdoom.dir/p_acs.o
FAILED: src/CMakeFiles/zdoom.dir/p_acs.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DDISABLE_SSE -DDYN_FLUIDSYNTH -DHAVE_FLUIDSYNTH -DNEED_STRUPR=1 -DNOASM -DNO_GTK=1 -DNO_SERVER_GUI=1 -D__forceinline=inline -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -I/usr/local/include/SDL -I"/Developer/FMOD Programmers API Mac/api/inc" -I../lzma/C -I/usr/local/include -I/usr/local/Cellar/openssl/1.0.2o_2/include -Isrc -I../src/. -I../src/g_doom -I../src/g_heretic -I../src/g_hexen -I../src/g_raven -I../src/g_strife -I../src/g_shared -I../src/huffman -I../src/Linux -I../src/oplsynth -I../src/sound -I../src/textures -I../src/thingdef -I../src/timidity -I../src/xlat -I../src/../gdtoa -I../src/../dumb/include -I../src/../sqlite -I../src/../upnpnat -Igdtoa -I../src/sdl -I. -stdlib=libc++ -std=c++14 -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers -Wno-inconsistent-missing-override -fno-rtti -fomit-frame-pointer -O3 -DNDEBUG -MD -MT src/CMakeFiles/zdoom.dir/p_acs.o -MF src/CMakeFiles/zdoom.dir/p_acs.o.d -o src/CMakeFiles/zdoom.dir/p_acs.o -c ../src/p_acs.cpp
../src/p_acs.cpp:2096:20: error: call to 'LittleShort' is ambiguous
        unsigned count = (LittleShort(((unsigned *)chunk)[1]) - 2) / 4;
                          ^~~~~~~~~~~
../src/./m_swap.h:34:14: note: candidate function
inline short LittleShort(short x)
             ^
../src/./m_swap.h:39:23: note: candidate function
inline unsigned short LittleShort(unsigned short x)
                      ^
../src/./m_swap.h:44:14: note: candidate function
inline short LittleShort(int x)
             ^
1 error generated.


The first error comes from the fact that jpegtexture.cpp includes m_swap.h (not directly), which includes all CoreFoundation, which overrides the values of TRUE and FALSE which were defined by the jpeg library. It seems gzdoom master already have taken care of that, so we'll have to check which changes to backport here.

I don't know about the second error. Probably that's what Blzut3 was talking about recently?
Attached Files

- Relationships

-  Notes
User avatar (0019899)
Blzut3 (administrator)
2018-10-04 03:27

The second one is the one I get.
User avatar (0019994)
Edward-san (developer)
2018-10-07 19:15
edited on: 2018-10-07 19:30

Error 1) is addressed by these two commits:https://bitbucket.org/zandronum/zandronum-sandbox-stable/commits/020f7dc738470ec820d8b0d0217906a8c9a65f27 [^] andhttps://bitbucket.org/zandronum/zandronum-sandbox-stable/commits/7c3bd8064ac82b0ca647c93e7fbb679f3fd74edf [^] .

Torr, can you check if the backport can be done?

[edit] Blzut3, do these changes work with the version you use to build the executables?

User avatar (0019995)
Blzut3 (administrator)
2018-10-07 19:52

Those combined with back portinghttps://github.com/coelckers/gzdoom/commit/6ef67e1d3e078c193245e3d9bc96e1931704d4f6 [^] fixes it for me.
User avatar (0020121)
Torr Samaho (administrator)
2018-10-14 09:13

Backporting those changes was no problem, but I could only test it under Windows. I pushed everything to the sandbox. Can you confirm that this works as intended under macOS? Then I'll push it to the main repo.
User avatar (0020124)
Edward-san (developer)
2018-10-14 15:44

The errors are cleaned, but actually I'm getting an error at link time (I hope it's a trivial thing):https://pastebin.com/ypb3c9wX [^]
User avatar (0020128)
Blzut3 (administrator)
2018-10-17 01:03

Looks like user error. You're compiling for x86_64 when I think the version of FMOD you're using is 32-bit only.
User avatar (0020132)
Blzut3 (administrator)
2018-10-17 23:58

Confirmed that it works fine on my setup.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2018-10-03 14:13 Edward-san New Issue
2018-10-03 14:13 Edward-san Status new => assigned
2018-10-03 14:13 Edward-san Assigned To => Blzut3
2018-10-04 03:27 Blzut3 Note Added: 0019899
2018-10-07 19:15 Edward-san Note Added: 0019994
2018-10-07 19:30 Edward-san Note Edited: 0019994 View Revisions
2018-10-07 19:52 Blzut3 Note Added: 0019995
2018-10-07 19:54 Blzut3 Assigned To Blzut3 => Torr Samaho
2018-10-14 09:13 Torr Samaho Note Added: 0020121
2018-10-14 15:44 Edward-san Note Added: 0020124
2018-10-17 01:03 Blzut3 Note Added: 0020128
2018-10-17 23:58 Blzut3 Note Added: 0020132






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker