Created attachment 181176 [details] Patch to upgrade audacity from 2.1.2 to 2.1.3 Update audacity from 2.1.2 to 2.1.3 with patch. audacity 2.1.3 now requires gcc49+ and fails to compile with llvm. patch attached.
Created attachment 181177 [details] Patch to upgrade audacity from 2.1.2 to 2.1.3 with extra patches deleted
It builds fine for me without USE_GCC.
(In reply to Dmitry Marakasov from comment #2) What is the uname -a output? When it tried to use clang 3.9.1, configure croaked with must use gcc 4.9 or higher
It builds fine in poudriere on 10, 11 and 12
Looks like the latest version of clang 4.0.0 works fine without the USE_GCC line. Patch should be fine just remove the USE_GCC.
Looks like we still need USE_GCC, the compiler:gcc-c++11-lib was making it so it compiled fine without checking to see if gcc was installed. <snip> checking dynamic linker characteristics... freebsd11.0 ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes checking how to run the C++ preprocessor... c++ -E checking for ld used by c++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes checking for c++ option to produce PIC... -fPIC -DPIC checking if c++ PIC flag -fPIC -DPIC works... yes checking if c++ static flag -static works... yes checking if c++ supports -c -o file.o... yes checking if c++ supports -c -o file.o... (cached) yes checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... freebsd11.0 ld.so checking how to hardcode library paths into programs... immediate checking for pkg-config... yes checking whether the linker accepts the -rdynamic flag... yes checking for an ANSI C-conforming const... yes checking for size_t... (cached) yes checking for alloca.h... (cached) no checking for libudev.h... no checking whether we are using gcc 4.9.0 or later... no configure: error: Audacity requires at least GCC 4.9
You're right, seems like USE_GCC is needed.
A commit references this bug: Author: amdmi3 Date: Wed May 31 18:45:18 UTC 2017 New revision: 442254 URL: https://svnweb.freebsd.org/changeset/ports/442254 Log: - Update to 2.1.3 PR: 218104 Submitted by: xxjack12xx@gmail.com (maintainer) Changes: head/audio/audacity/Makefile head/audio/audacity/distinfo head/audio/audacity/files/patch-lib-src_libnyquist_nyquist_nyqsrc_sound.h head/audio/audacity/files/patch-src_effects_VST_VSTEffect.cpp head/audio/audacity/files/patch-src_effects_vamp_LoadVamp.cpp head/audio/audacity/files/patch-src_import_ImportFLAC.cpp head/audio/audacity/pkg-plist
Got a runtime failure report: $ audacity Fatal Error: Mismatch between the program and library build versions detected. The library used 3.0 (wchar_t,compiler with C++ ABI 1002,wx containers,compatible with 2.6,compatible with 2.8), and your program used 3.0 (wchar_t,compiler with C++ ABI 1009,wx containers,compatible with 2.6,compatible with 2.8). Abort trap
This is actually a wxgtk issue being compiled by clang and audacity compiled with gcc5. This affects all software built with the new gcc5. gcc4.9 did not have this problem. I have a patch that I'll submit soon to fix that but this is a bigger issue that affects all software built with the new gcc5 and wxgtk being built with clang.
In reply to xxjack12xx from comment #10) I've submitted a patch to work around the issue. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219813
Can -fabi-compat-version=2 be used for this case?
I added CXXFLAGS+=-fabi-version=2 to /etc/make.conf and rebuilt audio/audacity. audacity was able to start.
A user has emailed me with patches to make audacity compile with clang, I'll check those out and see if that is a better solution.
For more background see https://bugzilla.redhat.com/show_bug.cgi?id=1200611
(In reply to xxjack12xx from comment #14) I think I've been the first one reporting this problem. If you need any help testing the patch, just ask me.
Created attachment 183543 [details] Test patch to drop gcc requirement It seems to build fine with clang with this simple patch. Could you please test if it works fine?
(In reply to Dmitry Marakasov from comment #17) Missing the configure gcc 4.9 check removal, testing with some modifications. Will let you know.
Been getting this error and not sure how to fix this. src/common/pa_front.c:117:12: warning: implicit declaration of function 'paMakeVersionNumber' is invalid in C99 [-Wimplicit-function-declaration] return paVersion; ^ src/common/pa_front.c:107:20: note: expanded from macro 'paVersion' #define paVersion paMakeVersionNumber(paVersionMajor, paVersionMinor, paVersionSubMinor) ^ src/common/pa_front.c:125:8: error: unknown type name 'PaVersionInfo' static PaVersionInfo versionInfo_ = { ^ src/common/pa_front.c:133:7: error: unknown type name 'PaVersionInfo' const PaVersionInfo* Pa_GetVersionInfo() ^ 1 warning and 2 errors generated. gmake[4]: *** [Makefile:231: src/common/pa_front.lo] Error 1
Created attachment 183551 [details] Add CXXFLAGS+=-fabi-version=2 Maybe for now, we should commit this compatibility CXXFLAGS so the program can function until the clang issue can be solved.
(In reply to xxjack12xx from comment #20) > Created attachment 183551 [details] > Add CXXFLAGS+=-fabi-version=2 > > Maybe for now, we should commit this compatibility CXXFLAGS so the program > can function until the clang issue can be solved. I'd strongly prefer to properly fix it with clang instead of introducing hacks with remaining possibility for other conflicts.
(In reply to xxjack12xx from comment #19) > Been getting this error and not sure how to fix this. > > src/common/pa_front.c:117:12: warning: implicit declaration of function > 'paMakeVersionNumber' is invalid in C99 > [-Wimplicit-function-declaration] > return paVersion; > ^ > src/common/pa_front.c:107:20: note: expanded from macro 'paVersion' > #define paVersion paMakeVersionNumber(paVersionMajor, paVersionMinor, > paVersionSubMinor) > ^ > src/common/pa_front.c:125:8: error: unknown type name 'PaVersionInfo' > static PaVersionInfo versionInfo_ = { > ^ > src/common/pa_front.c:133:7: error: unknown type name 'PaVersionInfo' > const PaVersionInfo* Pa_GetVersionInfo() > ^ > 1 warning and 2 errors generated. > gmake[4]: *** [Makefile:231: src/common/pa_front.lo] Error 1 make showconfig?
> make showconfig? Nah, I've figured it out - this is caused by conflict between bundled and system portaudio + incorrect cflags handling (system includes are added to cflags before local ones). USES=localbase should solve it.
(In reply to Dmitry Marakasov from comment #23) I'll test that out, thanks for finding the issue!
Created attachment 183636 [details] patch to make audacity compile with clang Here is a new patch that allows audacity to be compiled with clang. Included modifications of previous contributed patches.
Comment on attachment 183543 [details] Test patch to drop gcc requirement Missing removal of gcc 4.9 check in configure.
(In reply to xxjack12xx from comment #26) Was trying to set - on the flag for this patch but wouldn't save.
Created attachment 183697 [details] Updated patch to make audacity compile with clang and USES=local Since USES=local was added, the patches that worked around it are no longer needed and removed in this updated patch. Also removed some stuff that suppressed some configure warnings so they can be seen and fixed in the future.
Created attachment 183724 [details] Make audacity compile with clang and patch/option cleanups Make audacity compile with clang Delete patches obsoleted by USES=localbase Add new option SILENT to make builds less verbose which also obsoleted some patches. Remove MIDI option as that is not optional.
Anything need to be done before this can be committed? Ideally want this to be in before 11.1-RELEASE so we don't have a broken audacity on the release.
The 11.1-RELEASE date is approaching, is there anything we need to do so we can get this port working in the release?
A commit references this bug: Author: amdmi3 Date: Tue Jul 25 11:58:23 UTC 2017 New revision: 446572 URL: https://svnweb.freebsd.org/changeset/ports/446572 Log: - Update to 2.1.3 PR: 218104 Submitted by: xxjack12xx@gmail.com (maintainer) Changes: head/audio/audacity/Makefile head/audio/audacity/files/patch-Makefile.am head/audio/audacity/files/patch-configure.ac head/audio/audacity/files/patch-include_Makefile.am head/audio/audacity/files/patch-include_audacity_Types.h head/audio/audacity/files/patch-lib-src_libnyquist_Makefile.am head/audio/audacity/files/patch-lib-src_libnyquist_configure.ac head/audio/audacity/files/patch-lib-src_portaudio-v19_bindings_cpp_configure.ac head/audio/audacity/files/patch-lib-src_portmixer_include_portmixer.h head/audio/audacity/files/patch-lib-src_soundtouch_source_SoundTouch_Makefile.am head/audio/audacity/files/patch-m4_audacity__checklib__libsndfile.m4 head/audio/audacity/files/patch-src_Audacity.h head/audio/audacity/files/patch-src_AudioIO.h head/audio/audacity/files/patch-src_DeviceManager.cpp head/audio/audacity/files/patch-src_prefs_DevicePrefs.cpp head/audio/audacity/pkg-plist
Fixed with minor changes: - Added missing LIB_DEPENDS on libogg - Removed SILENT option, we do not support silent builds - Don't install LICENSE as documentation
I think we need to bump the portrevision since 2.1.3 was broken and these new changes fixes the breakage.
Any updates? I think this is related https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221545
*** Bug 221546 has been marked as a duplicate of this bug. ***
*** Bug 221545 has been marked as a duplicate of this bug. ***
(In reply to xxjack12xx from comment #34) > I think we need to bump the portrevision since 2.1.3 was broken and these > new changes fixes the breakage. Why(In reply to xxjack12xx from comment #35) > Any updates? I think this is related > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221545 Oops, I've had an idea my latest commit has updated the version. Bumping.
A commit references this bug: Author: amdmi3 Date: Tue Aug 22 17:26:44 UTC 2017 New revision: 448573 URL: https://svnweb.freebsd.org/changeset/ports/448573 Log: - Bump revision after recent port changes PR: 218104 Submitted by: xxjack12xx@gmail.com (maintainer) Changes: head/audio/audacity/Makefile