[LyX/master] Add move constructor and move assignment operator for FileName class

Stephan Witt st.witt at gmx.net
Thu Jan 14 16:57:30 UTC 2021


Am 14.01.2021 um 17:09 schrieb Stephan Witt <st.witt at gmx.net>:
> 
> Am 14.01.2021 um 09:30 schrieb Yuriy Skalko <yuriy.skalko at gmail.com>:
>> 
>>> Sorry, I’ve reverted the change for now locally. I can answer your questions later…
>>> Perhaps the compiler flags of the autotools build are of interest (but cmake build crashes either):
>>> Configuration
>>> Host type:               x86_64-apple-darwin18.7.0
>>> Special build flags:      build=release warnings callback-printing use-hunspell use-aspell
>>> Bundled libraries:        nod boost mythes
>>> C++ Compiler:            c++ -stdlib=libc++ (11.0.0)
>>> C++ Compiler flags:       -Wall -Wextra -fPIC -Os -std=c++17  -Wno-deprecated-register
>>> C++ Compiler user flags:  -I/Users/Shared/LyX/utilities/include   -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
>>> -arch x86_64 -mmacosx-version-min=10.10 -std=c++17  -std=c++11
>>> Linker flags:             -rdynamic
>>> Linker user flags:        -L/Users/Shared/LyX/utilities/lib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
>>> -arch x86_64 -mmacosx-version-min=10.10
>>> Qt Frontend:
>>>     Qt version:          5.12.9
>>> Packaging:               macosx
>>> Are all these library and compiler standard choice switches compatible and correct?
>>> Stephan
>> 
>> 
>> Thanks for testing Stephan and Scott.
>> So seems like it is macos-only issue. I see nothing suspicious in your compiler flags (are you manually override default C++17 to C++11?).
> 
> Yes, in the past I was forced to do so. I’ll try to work with consistent compiler switches.
> 
> Should it work w/o -std=c++17? What do expect to happen with different compiler switches for build of Qt-libs and LyX?

Ok, it doesn’t work on Apple with c++17 w/o loosing backwards compatibility and many warnings about deprecated classes:

Configuration
  Host type:               x86_64-apple-darwin18.7.0
  Special build flags:      build=release warnings callback-printing use-hunspell use-aspell
  Bundled libraries:        nod boost mythes
  C++ Compiler:            c++ -stdlib=libc++ (11.0.0)
  C++ Compiler flags:       -Wall -Wextra -fPIC -Os -std=c++17  -Wno-deprecated-register
  C++ Compiler user flags:  -I/Users/Shared/LyX/utilities/include   -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -arch x86_64 -mmacosx-version-min=10.10 -std=c++17  -std=c++17
  Linker flags:             -rdynamic
  Linker user flags:        -L/Users/Shared/LyX/utilities/lib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -arch x86_64 -mmacosx-version-min=10.10

The show stopper with -mmacosx-version-min=10.10 is:

/Users/stephan/git/lyx/src/insets/ExternalTransforms.cpp:334:20: error: 'any_cast<std::__1::function<std::__1::unique_ptr<const lyx::external::TransformCommand, std::__1::default_delete<const
      lyx::external::TransformCommand> > (lyx::external::RotationData)> >' is unavailable: introduced in macOS 10.14
        Factory factory = any_cast<Factory>(any_factory);

Using -mmacosx-version-min=10.14 as suggested I’m able to build LyX - but after revert of the revert (add move constructor again) it crashes again.

Using -mmacosx-version-min=10.10 and c++11 consistently it crashes too.

Stephan

>> The patch is already reverted in master branch.
>> 
>> 
>> Yuriy
>> -- 
>> lyx-devel mailing list
>> lyx-devel at lists.lyx.org
>> http://lists.lyx.org/mailman/listinfo/lyx-devel
> 
> -- 
> lyx-devel mailing list
> lyx-devel at lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-devel



More information about the lyx-devel mailing list