x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Build UE4 Failed from Source on Mac OS X

I am using the Engine source from branch 4.10. I have successfully run via Terminal:

./Setup.command

and

./GenerateProjectFiles.command

I am now on the section where I need to build Unreal Engine 4 from source using Xcode. I am on a Mac Mini running OS X El Capitan 10.11.4 with Xcode version 7.3. I am getting the following error during build:

jpgd.cpp

Shifting a negative signed value is undefined

alt text

What can I do to fix this? Is this related to not having libjpeg-dev installed on the Mac or is it related to clang or something else entirely? Please provide step-by-step guidance if you know of a solution.

Product Version: UE 4.10
Tags:
more ▼

asked Apr 13 '16 at 12:18 AM in Installation & Setup

avatar image

Sabun
48 4 9 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Alright, the issue has to do with how Clang in Xcode 7.3 has newly defined rules that jpgd.cpp does not obey. The quick fix was to edit the jpgd.cpp file as posted here. I am unaware of what repercussions this may have on projects, but so far nothing has gone wrong on my side. I am now able to build the engine properly using Xcode 7.3 with the Build for Running option under Product.

It produces a proper UE4Editor.app file which I can run in standalone.

Basically, inside the source folder for the engine at Engine/Source/ThirdParty/libJPG/jpgd.cpp, change line 569 to the following (notice the change in bracket usage):

static const int s_extend_offset[16] = { 0, (-(1<<1)) + 1, (-(1<<2)) + 1, (-(1<<3)) + 1, (-(1<<4)) + 1, (-(1<<5)) + 1, (-(1<<6)) + 1, (-(1<<7)) + 1, (-(1<<8)) + 1, (-(1<<9)) + 1, (-(1<<10)) + 1, (-(1<<11)) + 1, (-(1<<12)) + 1, (-(1<<13)) + 1, (-(1<<14)) + 1, (-(1<<15)) + 1 };

A possible alternative solution if you have access to the Apple Developer paid programme, then you can download an older version of Xcode that has an older version of Clang as posted here, if you feel unsafe modifying the jpgd.cpp file.

more ▼

answered Apr 13 '16 at 01:31 PM

avatar image

Sabun
48 4 9 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question