Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sigviewer fails to compile with clang 15 #137

Open
schloegl opened this issue Dec 21, 2024 · 5 comments
Open

sigviewer fails to compile with clang 15 #137

schloegl opened this issue Dec 21, 2024 · 5 comments

Comments

@schloegl
Copy link
Contributor

SigViewer fails to compile on MacOSX 14.7.2, using homebrew as well as compiling from source

/Library/Developer/CommandLineTools/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++1z  -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.15 -Wall -Wextra -DVERSION_MAJOR=0 -DVERSION_MINOR=6 -DVERSION_BUILD=4 -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -I/opt/homebrew/include -Isrc -I/opt/homebrew/lib/QtWidgets.framework/Headers -I/opt/homebrew/lib/QtGui.framework/Headers -I/opt/homebrew/lib/QtXml.framework/Headers -I/opt/homebrew/lib/QtCore.framework/Headers -Itmp/release -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AGL.framework/Headers -Itmp/release -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AGL.framework/Headers -I/opt/homebrew/share/qt/mkspecs/macx-clang -F/opt/homebrew/lib -o tmp/release/xdf_reader.o src/file_handling_impl/xdf_reader.cpp
src/file_handling_impl/xdf_reader.cpp:358:28: error: no viable conversion from 'iterator' to 'float *'
                    float* pt = raw_data->begin()  + (int)(round((stream.time_stamps[i]- XDFdata->minTS)* XDFdata->majSR));
                           ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [tmp/release/xdf_reader.o] Error 1

The compiler used

% clang++ -v

Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
@Yida-Lin
Copy link
Contributor

It may be related to xdf-modules/libxdf#43 (there are discussions at the bottom of the PR).

I am currently working on a fix, hopefully will finish in the next few days.

Meantime, if it is urgent, a temporary remedy is to compile libxdf prior to that PR and compile it with SigViewer. Thanks!

@schloegl
Copy link
Contributor Author

precompiling libxdf does not seem to help. I tried with libxdf 0.99 and 0.99.9 .

@cbrnr
Copy link
Owner

cbrnr commented Jan 18, 2025

@schloegl can you try if using auto helps? Alternatively, you might also want to try const_iterator instead of iterator.

@schloegl
Copy link
Contributor Author

At this time, I do not have access anymore to a MacOSX-based platform, and can not do these tests.
Linuxbrew is using gcc/g++ and is therefore not suitable to reproduce this issue.
If anyone is willing to sponsor a mac, I'm willing to give it a try.

@cbrnr
Copy link
Owner

cbrnr commented Jan 21, 2025

Clang is available for Linux, I don't think you need a Mac for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants