Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#62021 closed defect (fixed)

gnuplot-5.4.1 fails to upgrade if +qt5 speficied

Reported by: mouse07410 (Mouse) Owned by: reneeotten (Renee Otten)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mojca (Mojca Miklavec)
Port: gnuplot

Description

macOS 10.15.7, Xcode-12.3.

Apparently, fails to figure that compiler supports C++11:

.  .  .  .  .
:info:build In file included from /opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:105:
:info:build /opt/local/libexec/qt5/lib/QtCore.framework/Headers/qcompilerdetection.h:590:6: error: Qt requires a C++11 compiler and yours does not seem to be that.
:info:build #    error Qt requires a C++11 compiler and yours does not seem to be that.
:info:build      ^
.  .  .  .  .

My environment has these:

CFLAGS=-O3 -std=gnu18 -march=native -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
CXXFLAGS=-std=gnu++17 -O3 -march=native -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk

Full log attached.

Attachments (2)

gnuplot.main.log.txt (373.5 KB) - added by mouse07410 (Mouse) 4 years ago.
main.log after latest patch
gnuplot.main.log.2.txt (373.8 KB) - added by mouse07410 (Mouse) 4 years ago.
main.log after "port selfupdate; port clean --all gnuplot; port upgrade gnuplot"

Download all attachments as: .zip

Change History (17)

comment:1 Changed 4 years ago by reneeotten (Renee Otten)

Owner: set to reneeotten
Resolution: fixed
Status: newclosed

In 37c07751cbe4d776c5cd864d05c45136b9410cdf/macports-ports (master):

gnuplot: add -std=c++11

Closes: #62021

comment:2 Changed 4 years ago by reneeotten (Renee Otten)

sorry, I thought that setting compiler.cxx_standard 2011 would add the -std=c++11 automatically and that's why I removed it from the Portfile. I added it back now and it works for me now - please try again.

comment:3 Changed 4 years ago by mouse07410 (Mouse)

No joy. Same problem. Please see updated "main.log".

.  .  .  .  .
:info:build In file included from /opt/local/libexec/qt5/lib/QtCore.framework/Headers/QtCore:4:
:info:build In file included from /opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:105:
:info:build /opt/local/libexec/qt5/lib/QtCore.framework/Headers/qcompilerdetection.h:590:6: error: Qt requires a C++11 compiler and yours does not seem to be that.
:info:build #    error Qt requires a C++11 compiler and yours does not seem to be that.
:info:build      ^
.  .  .  .  .

comment:4 Changed 4 years ago by mouse07410 (Mouse)

Resolution: fixed
Status: closedreopened

Changed 4 years ago by mouse07410 (Mouse)

Attachment: gnuplot.main.log.txt added

main.log after latest patch

comment:5 Changed 4 years ago by reneeotten (Renee Otten)

are you sure that you did a selfupdate and cleaned the port first; in the log you added the -std=c++11 is not present in the CXXFLAGS. In my case it is, so that suggests you missed one of these steps.

Please do sudo port selfupdate ; sudo port clean --all gnuplot ; sudo port upgrade gnuplot.

comment:6 Changed 4 years ago by kencu (Ken)

When you say your environment has these:

CFLAGS=-O3 -std=gnu18 -march=native -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
CXXFLAGS=-std=gnu++17 -O3 -march=native -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk

what do you mean?

If you are adding these things yourself, then it is no surprise builds might fail...

comment:7 Changed 4 years ago by kencu (Ken)

Oh, in your log it doesn't seem that those flags are being used, if they are set, so I guess that's not likely relevant, in the end:

:debug:configure CXXFLAGS='-pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64'
148

comment:8 Changed 4 years ago by mouse07410 (Mouse)

what do you mean?

I mean that my ~/.bashrc contains

export CFLAGS=-O3 -std=gnu18 -march=native -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
export CXXFLAGS=-std=gnu++17 -O3 -march=native -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk

to make my *normal* compilations work properly. Not everything that I'm doing is confined within Macports. ;-)

-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk

I don't think I like this much. Is there a way to tell Macports to *not* do that, and use the default SDK on the platform, which is MacOSX11.1.sdk?

are you sure that you did a selfupdate and cleaned the port first

Yes I'm positive. In fact, I copy-pasted *your* command line as you showed.

Sending another log file, after sudo port selfupdate ; sudo port clean --all gnuplot ; sudo port upgrade gnuplot

Look for gnuplot.main.log.2.txt

Last edited 4 years ago by mouse07410 (Mouse) (previous) (diff)

Changed 4 years ago by mouse07410 (Mouse)

Attachment: gnuplot.main.log.2.txt added

main.log after "port selfupdate; port clean --all gnuplot; port upgrade gnuplot"

comment:9 Changed 4 years ago by mouse07410 (Mouse)

Funny. What made the difference was uninstalling the gnuplot port altogether.

sudo port uninstall gnuplot; sudo port clean --all gnuplot; sudo port install gnuplot +qt5 -qt

Successful installation.

comment:10 Changed 4 years ago by reneeotten (Renee Otten)

Resolution: fixed
Status: reopenedclosed

comment:11 Changed 4 years ago by jmroot (Joshua Root)

So gnuplot fails to install when an older version of gnuplot is installed? That still seems like a bug?

comment:12 Changed 4 years ago by mouse07410 (Mouse)

So gnuplot fails to install when an older version of gnuplot is installed? That still seems like a bug?

Yes.

However, I don't think I know enough to track it down.

comment:13 Changed 4 years ago by mouse07410 (Mouse)

Summary: gnuplot-5.4.1 fails to upgrade if +qt5 speficiedgnuplot-5.4.1 fails to upgrade if +qt5 specifed

comment:14 in reply to:  11 Changed 4 years ago by reneeotten (Renee Otten)

Summary: gnuplot-5.4.1 fails to upgrade if +qt5 specifedgnuplot-5.4.1 fails to upgrade if +qt5 speficied

Replying to jmroot:

So gnuplot fails to install when an older version of gnuplot is installed? That still seems like a bug?

I just went back and re-installed the previous version (5.2.8_0) of gnuplot +qt5, and then upgraded to the latest version (5.4.1_1) without any problems. So I cannot reproduce this and consider this a fluke, perhaps something specific to mouse07410. If there are others who report trouble as well I could look into this more, but for now I'd consider this resolved.

comment:15 Changed 4 years ago by mouse07410 (Mouse)

I don't know what to say. I've experienced this problem on all of my Catalina machines. On the other hand, they all run the latest Catalina, the latest Xcode, and have similar (though not identical!) ~/.bashrc.

Since the workaround (just delete the existing port) seems simple and painless enough, it's probably fine not to pursue this further...

Note: See TracTickets for help on using tickets.