Finding Missing Textures with Carrara for Mac El Capitain and Sierra

BrianP21361BrianP21361 Posts: 808
edited December 2016 in Carrara Discussion

With MacOS' prior to El Capitain when I opened a Carrara file that had a missing texture a window would pop up with the name of the missing texture at the very top. I was able to do a search, find the missing file and then the Carrara file opened properly. It happens more often than I'd like. In El Capitain amd Sierra, the window opens, but the text at the top is missing so I can't find the missing texture because I have no idea what it is. Carrara 7.2 didn't have the same issue so when that happens I open the same file with 7.2, write down the texture name. Quit Carrara 7.2. Go back to Carrara 8.5 and search for the missing texture. It's a pain.

I've been complaining about this to my son for months now and he was trying to write a plugin to identify the missing plugin. The thread is here: http://www.daz3d.com/forums/discussion/95286/advice-for-a-new-plugin#latest

Well, my son came up with a work around last night. Instead of the window with the blank missing texture at the top, he was able to get a window with the textures name to open. A screen shot is shown below. After hitting OK, the normal blank window opens, but now I know the missing texture name and can do a search to locate it. I've tried the fix on Sierra with Carrara 8.5 and it seems to work flawlessly. In my son's words:

"Carrara uses a library called Qt to handle the UI, which is what allows it to run on Windows and MacOS with the same code. Qt is open source, and so the issue can be fixed by downloading the source (4.8.7), patching a few lines of code and then compiling it. Once it is compiled, the frameworks in the Carrara app bundle can be swapped out with the newly patched ones to fix the issue." 

Unfortunately, he can't distribute the hacked Qt file because of copyright issues. If there's enough interest, he's willing to create a tutorial explaining how to do it and give you his code. 

Let me know if anyone is interested.

Screen Shot 2016-12-20 at 8.22.37 PM.png
1321 x 1071 - 339K
Post edited by BrianP21361 on
«1

Comments

  • TangoAlphaTangoAlpha Posts: 4,584

    I'm interested, Brian! Bravo Zulu to your son for investigating the issue and finding a workaround. yes

  • de3ande3an Posts: 915

    If there's enough interest, he's willing to create a tutorial explaining how to do it and give you his code. 

    Let me know if anyone is interested.

    Absolutely!

    I just hope I have enough coding knowledge to follow the instructions.

  • TGS808TGS808 Posts: 168

     

    Unfortunately, he can't distribute the hacked Qt file because of copyright issues. If there's enough interest, he's willing to create a tutorial explaining how to do it and give you his code. 

    Your son just put more work into Carrara than the Daz "developers" have in the past four years. Perhaps he can send his code and tutorial directly to them. Then they'd have no excuse for not fixing it.

  • TGS808 said:

     

    Unfortunately, he can't distribute the hacked Qt file because of copyright issues. If there's enough interest, he's willing to create a tutorial explaining how to do it and give you his code. 

    Your son just put more work into Carrara than the Daz "developers" have in the past four years. Perhaps he can send his code and tutorial directly to them. Then they'd have no excuse for not fixing it.

    Thanks TGS808. My son will appreciate that. Unfortunately, his work around is done outside of Carrara. He modified an external library. 

  • TGS808TGS808 Posts: 168
    Thanks TGS808. My son will appreciate that. Unfortunately, his work around is done outside of Carrara. He modified an external library. 

    And yet, he got it done. I was just kidding about him sending it to them but I was not kidding about him putting in more time and effort than they have. 

  • Sad, but true. 

  • de3ande3an Posts: 915

    Brian,

    I know that you're not getting much response to this thread, but I hope that won't deter you and your son from sharing the procedure for the workaround.

    Due to the obscurity of the bug, and the fact that it only affects the Mac version, many may not recognize this thread as a possible solution.

    In any case, I would very much like to try your workaround, as this particular bug is the one that affects me the most.

    Thanks.

  • de3an,

    He's written up the details for the fix. I just need to clean it up and post it. We're also going through the end use statement for Qt to see if and how we can share a modified version of it. It would be much simpler to provide the file than to have everyone try modifying it themselves. Installing it is as simple as replacing three files inside the Carrara package. I'll post something soon. 


    Merry Christmas.

  • de3ande3an Posts: 915

    Thanks for the update! I'll be watching this thread in anticipation.  smiley

    Even if you find that you can distribute the modded Qt code, I would still be very interested in seeing how the mod was made.

    Thanks again!

  • Since I will be upgrading to new hardware and the new Mac OS, I am also very, very, interested!

  • dot_batdot_bat Posts: 373

    yes please and many thanks to your son

  • Same here. Tired to restart on Yosemite each time I have to import something in Carrara.

    Tell your son he's a good man.smileyyes

  • BrianP21361BrianP21361 Posts: 808
    edited December 2016

    I've been usinfg the fix for a couple of days and have found an issue with scolling in the sidebar and content tabs with a trackpad. My son is working on it. He thinks it's because he used Qt 4.8.6 instead of Qt 4.6. Unfortunately he couldn't get Qt 4.6 to complile. I'm going to post the fix in a few minutes. Please let me know if you have any issues or find away aroubd the 4.6 complile problem. 

    Post edited by BrianP21361 on
  • BrianP21361BrianP21361 Posts: 808
    edited December 2016

    This guide will try to fix the issue on macOS with Carrara 8.5 where a missing file dialog appears, but does not display the title. It will involve compiling code from the source code and Terminal and requires some programming knowledge. It was tested on a machine running macOS 12.12.2, but it should work for older versions of macOS as well.

     

    First download Xcode from The Apple App Store. It’s a large file and might take a while to download. Open Xcode. It should prompt you to download the command line tools. Download them and then close Xcode. 

     

    Carrara uses a library called Qt (pronounced cute) to manage the cross-platform UI. Qt’s source code will be downloaded, modified, recompiled and put back into Carrara. Carrara 8.5 uses Qt 4.6.X, but unfortunately I couldn’t get that version to compile, at least under macOS 12.12, so I used Qt 4.8.6. Its worth noting that replacing Qt with a different version may cause bugs in Carrara. We have already found an issue with scrolling in the window tabs. Please backup the old version just in case.

     

    EDIT: It would appear that Carrara uses a semi-custom verson of Qt, and using Qt 4.6.X does not fix the scrolling bug. I was able to successfuly compile Qt 4.6.4 on a Mac running OS X 10.7.5 with Xcode version 3.2.2

     

    You may want to try to compile the version of Qt found inside of the Carrara package. That may eliminate the scrolling issue. If you can’t, go to http://download.qt.io/archive/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz and download 4.8.6. Once you have it download, extract it and open the extracted folder. We’re after a folder inside there named “src”. Open src and then open the “gui” folder. Next open the “dialogs” folder and find a file named “qfiledialog_mac.mm.” You can open this in any text editor you want, but I would recommend Xcode so you can view the line numbers referred to later. Once the file is open in Xcode, open the Xcode preferences and select text editing (the piece of paper with the pencil). The first option should be Show: Line numbers; check the box and then close the preference window. Now in the qfiledialog_mac.mm you should see numbers on the left of the window for every line.

     

    EDIT: There was an issue with the code provided, and may have yeilded a compilation error, the instructions have been updated to fix the issue.

    EDIT 2: There were some more issues with this step, hopefulyl resolved now.

     

    Press command + F and then paste in "QT_BEGIN_NAMESPACE" without the quotes. In Qt 4.8.6, there are two instances of this, we are interested in the top one, so use the arrows on the find menu to find the yellow highlighted QT_BEGIN_NAMESPACE closest to the top of the file. This should be line 69 in Qt 4.8.6. Before this line (line 68), paste in this code:

     

    #include <qmessagebox.h>

     

    Now we are going to patch the code to make the message box come up when there is a missing file. Again, press command + F and this time paste in "setTitle" without the quotes. Using the arror keys, you should be able to switch between 2 yellow highlighted peices of text. Find the one that is part of the larger line that reads:     

    [mSavePanel setTitle:qt_mac_QStringToNSString(title)];

    Place your cursor at the end of this line (after the semicolon) and press enter, then paste in this code:

     

        if (title.indexOf("locate") != -1) {
        
        QMessageBox caption_message;
        caption_message.setText(title);
        
        caption_message.exec();
            
        }

     

    Now use the arrows in the find text bar to find the next instance of setTitle and it should be part of a line that reads 

    [delegate->mSavePanel setTitle:qt_mac_QStringToNSString(q->windowTitle())];

    Place your cursor at the end of this line (after the semicolon) and press enter, then paste in this code:

     

        if (q->windowTitle().indexOf("locate") != -1) {
            
            QMessageBox caption_message;
            caption_message.setText(q->windowTitle());
            
            caption_message.exec();
            
        }

     

    Now press command + F again and paste in "navOptions.windowTitle" without the quotes. There should on be one instance of this in the file, and it should be part of a larger line:

    navOptions.windowTitle = QCFString::toCFStringRef(q->windowTitle());

    Place your cursor at the end of this line (after the semicolon) and press enter, then paste in this code:

     

        if (q->windowTitle().indexOf("locate") != -1) {
            
            QMessageBox caption_message;
            caption_message.setText(q->windowTitle());
            
            caption_message.exec();
            
        }

     

    All the necessary code has been changed. Save the file and close it. You can quit Xcode now. Next open up Terminal, it should be in Applications/Utilities/. You should see a command prompt. 

     

    Figure out where the Qt folder you extracted is (named qt-everywhere-opensource-src-4.8.6 as long as you didn’t rename it). Then in terminal type “cd ”, making sure to put the space after cd. Then drag the qt-everywhere-opensource-src-4.8.6 from finder into the Terminal window. You should see something like “cd /Users/YourName/Downloads/qt-everywhere-opensource-src-4.8.6/”. Hit enter. Next, copy and paste the following command and press enter.

     

    ./configure -debug-and-release -nomake examples -no-qt3support -prefix /usr/local/Qt-4.8.6 -arch x86_64

     

    You will then be asked to select which edition of Qt you want to use. Type o and then hit enter. You’ll then have to accept the license agreement, so it will prompt you. Type “yes” and hit enter. A lot of computer gibberish will fill the window, so wait until it is done. You can tell its done because it will stop and your username followed by a $will be displayed. For example, mine will be Logan$ and then a grey block for a cursor. 

     

    Now we’re going to build Qt. Type “make -j8” replacing the 8 with the number of cores you have on your computer * 2. Typing in “make” without the “-jx” will also work but will be slower. Press enter and cross your fingers. This is going to take a while, but when it finishes you shouldn’t see any red text that says error. 

     

    After Qt is done compiling we need to change a few internal things in the frameworks. In your qt-everywhere-opensource-src-4.8.6 folder, open the folder named lib. Find QtGui.framework, QtCore.framework and QtOpenGL.framework and copy them to a new folder on your desktop called “New Libraries”. Then open up Terminal again and type “cd /Users/YOUR_USERNAME_HERE/Desktop/New Libraries/” replacing YOUR_USERNAME_HERE with your actual username. Then, copy and paste these commands one by one, hitting enter after each one. 

     

    install_name_tool -id @executable_path/../Frameworks/QtCore.framework/QtCore QtCore.framework/QtCore

     

    install_name_tool -id @executable_path/../Frameworks/QtGui.framework/QtGui QtGui.framework/QtGui

     

    install_name_tool -id @executable_path/../Frameworks/QtOpenGL.framework/QtOpenGL QtOpenGL.framework/QtOpenGL

     

    install_name_tool -change /usr/local/Qt-4.8.6/lib/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/QtCore QtGui.framework/QtGui

     

    install_name_tool -change /usr/local/Qt-4.8.6/lib/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/QtCore QtOpenGL.framework/QtOpenGL

     

    install_name_tool -change /usr/local/Qt-4.8.6/lib/QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui.framework/QtGui QtOpenGL.framework/QtOpenGL

     

    After all those commands are entered, it’s done! You have the required files and are ready to copy them to Carrara. Open up the folder where you have the Carrara application. Right click the Carrara application and hit “Show package contents”. Then navigate to Contents/Frameworks/ and copy the QtGui.framework, QtCore.framework and QtOpenGL.framework to a new folder on your desktop called “Carrara Framework Backup”. That way you can revert to the original version that came with Carrara.

     

    Open up your “New Libraries” folder and copy QtGui.framework, QtCore.framework and QtOpenGL.framework, then paste them into the Carrara.app/Contents/Frameworks/ folder, replacing the old ones. 

     

    You can close out of everything now. Open up Carrara and cross your fingers. If it doesn’t crash, you should be good to go. To verify that it worked, open up a file with a missing texture. You should see a popup window asking for you to locate the missing file and once you hit ok, you should be prompted with the file dialog to select it. 

     

    Good luck :)

     

    Post edited by BrianP21361 on
  • de3ande3an Posts: 915

    I’m working through the instructions, trying to understand what I’m doing before I actually try it.

    Since Qt 4.6 is actually the correct version, I’d like to try that first. I’m using Mac OS 10.11.6 so perhaps it will compile properly.

    However I won’t be able to follow your instructions verbatim if I use Qt 4.6.
    I downloaded qt-everywhere-opensource-src-4.6.4.tar.gz and see that the qfiledialog_mac.mm file is different, resulting in different line number locations to paste your code snippet.

    If I analyzed the qfiledialog_mac.mm files correctly, the following are the equivalent line number locations to paste the code (along with the code existing at those locations):

    *Line 182 = Line 174:[self createPopUpButton:selectedVisualNameFilter hideDetails:hideNameFilterDetails];
    *Line 720 = Line 659:    [delegate->mSavePanel setPrompt:[delegate strip:acceptLabel]];
    *Line 1022 = Line 942, the blank line following:navOptions.windowTitle = QCFString::toCFStringRef(q->windowTitle());

    Concerning the code snippet that is to be copied and pasted in. It appears that some extra carriage returns and some “Option-spaces” got inserted into the text when posted to the forum (probably due to the forum’s html formatting.
    I assume that it was supposed to look like the following:

    if (q->windowTitle().indexOf("locate") != -1) {
            QMessageBox caption_message;
            caption_message.setText(q->windowTitle());
            caption_message.exec();
     }

     

    When entering the following:
    ./configure -debug-and-release -nomake examples -no-qt3support -prefix /usr/local/Qt-4.8.6 -arch x86_64
    Do I just need to substitute “Qt-4.6.4” for “Qt-4.8.6”?


    In the instruction “You will then be asked to select which edition of Qt you want to use. Type o and then hit enter.” Is that actually “Type o”, or “Type 0” (zero)?


    In the instruction “Type “make -j8” replacing the 8 with the number of cores you have on your computer * 2.” I have a dual quad core Mac so I'm guessing that I would enter -j16?.

    If I'm reading the man page for the “make” command correctly, It would appear that you could simplify this command by just typing “make -j” and it would use all available processors, since it states:
    -j [jobs], --jobs[=jobs]
                Specifies the number of jobs (commands) to run simultaneously.  If
                there  is  more than one -j option, the last one is effective.  If
                the -j option is given without an argument, make  will  not  limit
                the number of jobs that can run simultaneously.


    There are three other commands that begin:
    install_name_tool -change /usr/local/Qt-4.8.6/lib/QtCore.framework/Versions/4/QtCore

    Should I just substitute “Qt-4.6.4” for “Qt-4.8.6”, or is there more to be changed?


    Thanks,
    (and sorry for all the questions)

  • de3an,

    I'm glad you are giving it a try. I'm going to have to pass your questions off to my son, since I don't program. I'll get him to answer you later today. 

    He was able to get Qt4.6 to compile yesterday using an older Mac running Lion (10.7). It had the same problems with scrolling. He believes that Daz modified Qt to make it work. Without the original source code there's not much he can do. He hasn't given up yet.

  • TangoAlphaTangoAlpha Posts: 4,584

    I'm not going to touch it before I've turned in my current WIP (before Start Of Play 2017, hopefully), but I'll keep an eye on progress in this thread.

  • de3an said:

    I’m working through the instructions, trying to understand what I’m doing before I actually try it.

    Since Qt 4.6 is actually the correct version, I’d like to try that first. I’m using Mac OS 10.11.6 so perhaps it will compile properly.

    However I won’t be able to follow your instructions verbatim if I use Qt 4.6.
    I downloaded qt-everywhere-opensource-src-4.6.4.tar.gz and see that the qfiledialog_mac.mm file is different, resulting in different line number locations to paste your code snippet.

    If I analyzed the qfiledialog_mac.mm files correctly, the following are the equivalent line number locations to paste the code (along with the code existing at those locations):

    *Line 182 = Line 174:[self createPopUpButton:selectedVisualNameFilter hideDetails:hideNameFilterDetails];
    *Line 720 = Line 659:    [delegate->mSavePanel setPrompt:[delegate strip:acceptLabel]];
    *Line 1022 = Line 942, the blank line following:navOptions.windowTitle = QCFString::toCFStringRef(q->windowTitle());

    Concerning the code snippet that is to be copied and pasted in. It appears that some extra carriage returns and some “Option-spaces” got inserted into the text when posted to the forum (probably due to the forum’s html formatting.
    I assume that it was supposed to look like the following:

    if (q->windowTitle().indexOf("locate") != -1) {
            QMessageBox caption_message;
            caption_message.setText(q->windowTitle());
            caption_message.exec();
     }

     

    When entering the following:
    ./configure -debug-and-release -nomake examples -no-qt3support -prefix /usr/local/Qt-4.8.6 -arch x86_64
    Do I just need to substitute “Qt-4.6.4” for “Qt-4.8.6”?


    In the instruction “You will then be asked to select which edition of Qt you want to use. Type o and then hit enter.” Is that actually “Type o”, or “Type 0” (zero)?


    In the instruction “Type “make -j8” replacing the 8 with the number of cores you have on your computer * 2.” I have a dual quad core Mac so I'm guessing that I would enter -j16?.

    If I'm reading the man page for the “make” command correctly, It would appear that you could simplify this command by just typing “make -j” and it would use all available processors, since it states:
    -j [jobs], --jobs[=jobs]
                Specifies the number of jobs (commands) to run simultaneously.  If
                there  is  more than one -j option, the last one is effective.  If
                the -j option is given without an argument, make  will  not  limit
                the number of jobs that can run simultaneously.


    There are three other commands that begin:
    install_name_tool -change /usr/local/Qt-4.8.6/lib/QtCore.framework/Versions/4/QtCore

    Should I just substitute “Qt-4.6.4” for “Qt-4.8.6”, or is there more to be changed?


    Thanks,
    (and sorry for all the questions)

    Here are the asnwers to your questions:

    1. I took a look at the source for Qt 4.6.4, and the line numbers you provided were correct.

    2. White space in code doesn't matter, so either your version or the original code will work. However I did make a mistake on the orignial instructions about the code, so I will update that in a moment.

    3. Replacing “Qt-4.6.4” for “Qt-4.8.6” is uncecesary. This is just telling the compiler where it can find the dependencies for the frameworks if they were used from the /usr/local/Qt-X.X.X folder. Since we are installing the frameworks in the Carrara.app instead, we need to tell the frameworks that their dependencies can be found there, hence all of the install_name_tool commands. This should answer your question for chaning “Qt-4.6.4” to “Qt-4.8.6” in the intall_name_tool step. So long as you don't change anything when you do the ./configure, leaving the commands unchanged will work.

    4. The -j argument is actually uncessary, and adding it will just increase the speed that the compilation finishes. Thank you for pointing out that -j will use as many as possible, I'll update it in the intructions. 

     

    If you have any more questions, don't hesitate to ask.

  • de3ande3an Posts: 915
    edited December 2016

    OK... problems with the instructions, I think.

    The instructions direct you to insert the new code snippets at lines 182, 720, and 1022.

    However, as soon as you insert the first block of new code you will add lines to the qfiledialog file, making lines 720 and 1022 inaccurate as reference points since you have just added at least five new lines (more if you didn’t strip out all of the extraneous carriage returns introduced by the forum posting).

    If you stripped the new code blocks down to a total of five lines each, then line 720 becomes 725, and line 1022 will become 1032 after adding lines at line 725.

    I believe that the directions should instruct you to paste the copied code immediately ahead of the lines with the following contents:

    First Paste.... [self createPopUpButton:selectedVisualNameFilter hideDetails:hideNameFilterDetails];
    Second Paste... [delegate->mSavePanel setPrompt:[delegate strip:acceptLabel]];
    Third Paste.... navOptions.location.h = -1;

     

    These text strings only appear once in the file, so they should be good for use as reference points.
    (Assuming that I didn’t make any mistakes. If I did, then that might explain all the warnings and errors that I got while compiling. Second post to follow.)

    Post edited by de3an on
  • de3ande3an Posts: 915
    edited December 2016

    Using the qt-everywhere-opensource-src-4.8.6 source files, I’ve gone through the steps to build the three new framework files, but haven’t tried swapping them out in Carrara yet because of the many warning messages during “configure” (about 170) and “make” (about 440). And six Errors during “make” consisting of the following (each repeated twice).

    dialogs/qfiledialog_mac.mm:182:9: error: use of undeclared identifier 'q'
        if (q->windowTitle().indexOf("locate") != -1) {
            ^
    dialogs/qfiledialog_mac.mm:183:9: error: unknown type name 'QMessageBox'
            QMessageBox caption_message;
            ^
    dialogs/qfiledialog_mac.mm:726:9: error: unknown type name 'QMessageBox'
            QMessageBox caption_message;
            ^

     

    The “install_name_tool” commands produce errors on all but the first one:

    DJC-Mac-Pro-8:New Libraries djc$ install_name_tool -id @executable_path/../Frameworks/QtCore.framework/QtCore QtCore.framework/QtCore

    DJC-Mac-Pro-8:New Libraries djc$ install_name_tool -id @executable_path/../Frameworks/QtGui.framework/QtGui QtGui.framework/QtGui
    error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: QtGui.framework/QtGui (No such file or directory)

    DJC-Mac-Pro-8:New Libraries djc$ install_name_tool -id @executable_path/../Frameworks/QtOpenGL.framework/QtOpenGL QtOpenGL.framework/QtOpenGL
    error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: QtOpenGL.framework/QtOpenGL (No such file or directory)

    DJC-Mac-Pro-8:New Libraries djc$ install_name_tool -change /usr/local/Qt-4.8.6/lib/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/QtCore QtGui.framework/QtGui
    error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: QtGui.framework/QtGui (No such file or directory)

    DJC-Mac-Pro-8:New Libraries djc$ install_name_tool -change /usr/local/Qt-4.8.6/lib/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/QtCore QtOpenGL.framework/QtOpenGL
    error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: QtOpenGL.framework/QtOpenGL (No such file or directory)

    DJC-Mac-Pro-8:New Libraries djc$ install_name_tool -change /usr/local/Qt-4.8.6/lib/QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui.framework/QtGui QtOpenGL.framework/QtOpenGL
    error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: QtOpenGL.framework/QtOpenGL (No such file or directory)


    Using Xcode Version 8.2.1
    Mac OS 10.11.6

    Any Idea what’s wrong?

    Post edited by de3an on
  • TGS808TGS808 Posts: 168
    de3an said:

     

    Any Idea what’s wrong?

    Yes. End users seeminlgy have to fix bugs on their own.

  • BrianP21361BrianP21361 Posts: 808
    edited December 2016

    de3an,

    I apologize for the issues that you're having, as they are my fault. You are getting errros with the install_name_tool because the compile failed. You're totally rigth about the line numbers being really off, and that is totally my fault, I wrote the guide after I had already patched the files. The undeclared identifier of q is due to an issue with copying and pasting the same code for all 3 steps, which I have already fixed in the guide. Unless you backed up the orignial file, it might make more sense to just copy and paste in the old file and start from scratch. Im going to update the instructions to remedy the errors that youre having as well as the issue with the line numbers. The new edited version should also be the same for Qt 4.8.6 and Qt 4.6.4.

    Post edited by BrianP21361 on
  • de3ande3an Posts: 915
    edited January 2017

    Starting over, I deleted the previous “qt-everywhere-opensource-src-4.8.6” folder and “New Libraries” folder, and unzipped a fresh one.

    Following the new instruction, everything was straight forward with no confusing steps.

    However, now the “configure” step produces 173 instances of “warning”.
    And the “make” step produces 2554 instances of “warning”, and 9 instances of “error” (in red).

     

                                   **************************
    clang: error: unable to execute command: posix_spawn failed: Resource temporarily unavailable
                                   **************************
    clang: error: unable to execute command: posix_spawn failed: Resource temporarily unavailable
                                   **************************
    make[2]: g++: Resource temporarily unavailable
    make[2]: *** [.obj/debug-shared/qsidebar.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[2]: *** [.obj/debug-shared/qprogressdialog.o] Error 1
    clang: error: unable to execute command: posix_spawn failed: Resource temporarily unavailable
    make[2]: *** [.obj/debug-shared/qpagesetupdialog.o] Error 1
                                   **************************
    In file included from ../../include/QtGui/private/qpaintengine_raster_p.h:1clang:
    : ../../include/QtGui/private/../../../src/gui/painting/qpaintengine_raster_p.h:error    virtual void drawImage(const QRectF &r, const QImage &image, const QRectF &sr);287:
    :10unable to execute command: posix_spawn failed: Resource temporarily unavailable                 ^:
                                   **************************
    error: unable to execute command: posix_spawn failed: Resource temporarily unavailable
        virtual void updateState(const QPaintEngineState &state);
                     ^
    make[2]: *** [.obj/release-shared/qcombobox.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[2]: *** [.obj/release-shared/qabstractslider.o] Error 1
                                   **************************
    painting/qpaintengine_mac.cpp:345:19: error: use of undeclared identifier 'CMGetProfileByAVID'
        CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displayProfile);
                                   **************************
    painting/qpaintengine_mac.cpp:348:9: error: use of undeclared identifier 'CMCloseProfile'
            CMCloseProfile(displayProfile);
                                   **************************
    make[2]: *** [.obj/debug-shared/qpaintengine_mac.o] Error 1
                                   **************************
    painting/qpaintengine_mac.cpp:345:19: error: use of undeclared identifier 'CMGetProfileByAVID'
        CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displayProfile);
                      ^
                                   **************************
    painting/qpaintengine_mac.cpp:348:9: error: use of undeclared identifier 'CMCloseProfile'
            CMCloseProfile(displayProfile);
            ^
                                   **************************
    make[2]: *** wait: No child processes.  Stop.
    make[1]: *** [release-all] Error 2
    make: *** [sub-gui-make_default-ordered] Error 2
                                   **************************


    The “install_name_tool” steps produce the same errors as previously reported.

    I’m pretty sure that I’m not making any major mistakes. Although I’m not a programmer, I am familiar with the kinds of file manipulations that are being used.

    What could it be that you are doing differently to get a successful build?
    Have you tried compiling using the latest instructions, verbatim?

     

    Post edited by de3an on
  • de3an said:

    Starting over, I deleted the previous “qt-everywhere-opensource-src-4.8.6” folder and “New Libraries” folder, and unzipped a fresh one.

    Following the new instruction, everything was straight forward with no confusing steps.

    However, now the “configure” step produces 173 instances of “warning”.
    And the “make” step produces 2554 instances of “warning”, and 9 instances of “error” (in red).

     

                                   **************************
    clang: error: unable to execute command: posix_spawn failed: Resource temporarily unavailable
                                   **************************
    clang: error: unable to execute command: posix_spawn failed: Resource temporarily unavailable
                                   **************************
    make[2]: g++: Resource temporarily unavailable
    make[2]: *** [.obj/debug-shared/qsidebar.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[2]: *** [.obj/debug-shared/qprogressdialog.o] Error 1
    clang: error: unable to execute command: posix_spawn failed: Resource temporarily unavailable
    make[2]: *** [.obj/debug-shared/qpagesetupdialog.o] Error 1
                                   **************************
    In file included from ../../include/QtGui/private/qpaintengine_raster_p.h:1clang:
    : ../../include/QtGui/private/../../../src/gui/painting/qpaintengine_raster_p.h:error    virtual void drawImage(const QRectF &r, const QImage &image, const QRectF &sr);287:
    :10unable to execute command: posix_spawn failed: Resource temporarily unavailable                 ^:
                                   **************************
    error: unable to execute command: posix_spawn failed: Resource temporarily unavailable
        virtual void updateState(const QPaintEngineState &state);
                     ^
    make[2]: *** [.obj/release-shared/qcombobox.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[2]: *** [.obj/release-shared/qabstractslider.o] Error 1
                                   **************************
    painting/qpaintengine_mac.cpp:345:19: error: use of undeclared identifier 'CMGetProfileByAVID'
        CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displayProfile);
                                   **************************
    painting/qpaintengine_mac.cpp:348:9: error: use of undeclared identifier 'CMCloseProfile'
            CMCloseProfile(displayProfile);
                                   **************************
    make[2]: *** [.obj/debug-shared/qpaintengine_mac.o] Error 1
                                   **************************
    painting/qpaintengine_mac.cpp:345:19: error: use of undeclared identifier 'CMGetProfileByAVID'
        CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displayProfile);
                      ^
                                   **************************
    painting/qpaintengine_mac.cpp:348:9: error: use of undeclared identifier 'CMCloseProfile'
            CMCloseProfile(displayProfile);
            ^
                                   **************************
    make[2]: *** wait: No child processes.  Stop.
    make[1]: *** [release-all] Error 2
    make: *** [sub-gui-make_default-ordered] Error 2
                                   **************************


    The “install_name_tool” steps produce the same errors as previously reported.

    I’m pretty sure that I’m not making any major mistakes. Although I’m not a programmer, I am familiar with the kinds of file manipulations that are being used.

    What could it be that you are doing differently to get a successful build?
    Have you tried compiling using the latest instructions, verbatim?

     

    I was able to get the libraries to compile with the latest instructions. The poisx errors you are getting is because your computer is having trouble making new processes to compile the code. Try either removing the -j argumenmt or limitting it to a number like 4. The other error you got I did not get when I compiled, but I did some searching on the internet and it would seem that some people have been able to resolve the error by making the following change:

    In src/gui/painting/qpaintengine.cpp replace lines 338-346 with 

    colorSpace = CGDisplayCopyColorSpace( displayID );

     

    See if that fixes your compile issues. Also if your compile fails the install_name_tool will also fail.

  • de3ande3an Posts: 915

    Brian,

    Thanks for your help, but this just keeps getting deeper and deeper.

    I patched the file that you mentioned. Well, not exactly. Instead of patching the "qpaintengine.cpp" file, my research pointed to the "qpaintengine_mac.cpp" file.

    http://github.com/Homebrew/formula-patches/blob/master/qt/el-capitan.patch

    I did a fresh “make” without the -j this time (which took hours!). This produced a huge amount of compile data in the Terminal window (which I saved). This data contained a whopping 57452 occurrences of “warning”, but only one “error”.

    fatal error: 'QTKit/QTDataReference.h' file not found

    QT in this case referring to QuickTime. Apparently, QTKit support has been removed from both Mac OS 10.12 and Xcode 8. While I’m only using OS 10.11, I am using Xcode 8.2.1.

    Unfortunately, I didn’t see any workarounds that I could follow with my level of experience. So this Carrara patch may be beyond my reach.

  • de3an said:

    Brian,

    Thanks for your help, but this just keeps getting deeper and deeper.

    I patched the file that you mentioned. Well, not exactly. Instead of patching the "qpaintengine.cpp" file, my research pointed to the "qpaintengine_mac.cpp" file.

    http://github.com/Homebrew/formula-patches/blob/master/qt/el-capitan.patch

    I did a fresh “make” without the -j this time (which took hours!). This produced a huge amount of compile data in the Terminal window (which I saved). This data contained a whopping 57452 occurrences of “warning”, but only one “error”.

    fatal error: 'QTKit/QTDataReference.h' file not found

    QT in this case referring to QuickTime. Apparently, QTKit support has been removed from both Mac OS 10.12 and Xcode 8. While I’m only using OS 10.11, I am using Xcode 8.2.1.

    Unfortunately, I didn’t see any workarounds that I could follow with my level of experience. So this Carrara patch may be beyond my reach.

    de3an,

    I'm sorry to hear that you're having so many issues. It's been my son, Logan masquarading as me, who's been helping you. I'll have him take one more look at your issue. 

    Brian

  • evilproducerevilproducer Posts: 9,050

    Well, this one solution sounds like it is beyond me! I'll study up on it when I get more time. Thanks to your son, Brian, for taking the time to help us out!

     

  • Thanks for all your patience. My son did some research and decided that the modified Qt files could be distributed as long as the source code was included. You can find the new Qt frameworks on GitHub (https://github.com/BlueSpud/Carrara-Missing-File-Fix) along with these directions. Please let me know if you have any issues.

    Carrara Missing File Fix

    This repository contains the required binaries and source code to patch an issue with Carrara 8.5 that causes missing file dialogs to be displayed with no indication of which file to locate. The repository contains the complete modified source in complienece with the Qt Open Source license as well as the compiled binaries.

    Installation Instructions

    To intsall the fix, first create a folder on your desktop and name it something like "Carrara Framework Backup."

    Then locate your Carrara.app, this is the application that you click on to launch Carrara.

    Next, right click it and select the option that says "Show Package Contents." A new Finder window should pop up with a single folder named "Contents" in it.

    Open the Contents folder and then open the "Frameworks" folder. 

    In this folder you should see several files, copy the three that are called "QtGui.framework", "QtCore.framework" and "QtOpenGL.framework" to the folder you created in the first step.

    Next open where ever you downloaded the reposity and open up the "binaries" folder. Copy the "QtGui.framework", "QtCore.framework" and "QtOpenGL.framework" from the "binaries" folder to the "Frameworks" folder in the Carrara.app, replacing the ones that are already there.

    Launch Carrara and the issue should be resolved. If you need to revert the patch, simply take the three files from the folder you created and paste them back into the Frameworks folder, replacing the patched ones.

    Known Issues

    It would appear that Daz has modified Qt slightly and scrolling with the scroll wheel in the side and content tabs no longer works after the patch is applied. Scrolling by pulling the scroll bar still works as expected.

     

  • de3ande3an Posts: 915

    Thanks Brian.

    I have some non-Carrara, real life stuff happening right now, and may not be able to try this out for some time.

    I'll post my results when I can.

     

  • de3an,

    Good luck. I hope it works.

Sign In or Register to comment.