Commit Graph

613 Commits

Author SHA1 Message Date
luz paz 3d395585c1
Fix various typos
Found via `codespell -q 3 -S *.po,./share/patchfiles,./libs -L ba,buss,busses,doubleclick,hsi,ontop,ro,seh,siz,sord,sur,te,trough,ue`  
Follow-up to 364f2f078
2022-04-08 19:51:02 +02:00
luz paz 59320b378f
wscript: fix 'testing equality is none' issue
ref: https://lgtm.com/rules/7900090/
2022-04-08 18:27:10 +02:00
a1batross f26257d6e4
wscript: fix Apple-specific flag being added on non-Apple platforms
Although GCC and Clang completely ignore this flag on non-Apple platforms, some "GCC-compatible" compilers may not, like EDG frontend based compilers.
2022-04-08 18:19:54 +02:00
Mads Kiilerich 6ff1d86cad wscript: improve configure messages slightly 2022-01-22 22:19:07 +01:00
Robin Gareus 97439d8777
Flip option, disable compile-database by default 2022-01-20 20:13:46 +01:00
Robin Gareus 9886d6c19e
Allow to disable clang_compilation_database
See also af69061644 and b8e1cd53c. This can be useful in
some cases where running a dry-run build will fail.
e.g. with --freedesktop files that are not generated before the
actual build.
2022-01-19 17:12:36 +01:00
Robin Gareus af69061644
Do not create clang-db when cross-compiling w/mingw
This breaks windows builds, since apparently build(bld) is
evaluated twice (once to write compile_commands.json and once
to compile), even though `obj` is reset.

eg. in libs/pbd/wscript

```
if bld.env['build_target'] == 'mingw':
  obj.source += [ 'windows_special_dirs.cc' ]
```

results in

[  65/1159] Compiling libs/pbd/windows_special_dirs.cc
[  69/1159] Compiling libs/pbd/windows_special_dirs.cc

which then produces an error when linking:
```
/usr/bin/x86_64-w64-mingw32-ld: libs/pbd/windows_special_dirs.cc.2.o:libs/pbd/windows_special_dirs.cc:28: multiple definition of `PBD::get_win_special_folder_path[abi:cxx11](int)'; libs/pbd/windows_special_dirs.cc.2.o:libs/pbd/windows_special_dirs.cc:28: first defined here
```
2022-01-10 17:10:49 +01:00
Remi Thebault b8e1cd53ce
Prepare waf update to 2.0.23 and enable 'clang_compilation_database'
This enables the generation of build/compile_commands.json
which is a compilation database recognized by some IDE/editors
to provide compiler quality linting.
To name a few:
 - Visual Studio Code
 - VIM (with ALE plugin)
2022-01-09 18:45:50 +01:00
Robin Gareus ddc03bbc5e
Bundle some media-files 2021-12-16 19:08:03 +01:00
Robin Gareus baf5a13f17
Update atomic/volatile compat
With glib 2.64, volatile gint produce annoying Wcast-qual
compiler warnings with mingw/gcc-8.

Even though the the build succeeds, and only glib 2.68+
requires non-volatile atomics this results in a much
cleaner build-log.
2021-08-16 04:26:55 +02:00
Paul Davis 322bca7fb3 remove -ansi from c++ flag used when configuring with --strict (forces C++98) 2021-08-13 12:51:34 -06:00
Paul Davis 10473ab3a6 build gtk2_ardour again 2021-08-13 12:51:27 -06:00
Paul Davis f0323c2f1b temporarily do not build gtk2_ardour while working on canvas layout support 2021-08-13 12:51:26 -06:00
Robin Gareus ed959c2708
Remove outdated configuration warning 2021-07-03 20:17:19 +02:00
Robin Gareus d4212da693
AU: standalone scanner tool 2021-07-03 19:07:26 +02:00
Robin Gareus a74b4e8ef0
No more wine 2021-07-03 19:07:25 +02:00
Robin Gareus 44c0535b10
Fix gprof builds
`-pg` needs is both a compiler and linker flag.
2021-05-23 01:05:22 +02:00
Robin Gareus ea01ec5988
Correctly detect glib volatile atomic
see also https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1919
2021-03-30 15:29:53 +02:00
Robin Gareus 046d7d01f5
Fix boost 1.74 + gcc 10.2 warnings
bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the
Bind placeholders (_1, _2, ...) in the global namespace is deprecated.
Please use <boost/bind/bind.hpp> + using namespace boost::placeholders,
or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.
2021-01-26 01:54:37 +01:00
Robin Gareus cbd2cc7b2e
Enable FMA support for windows 64bit 2021-01-20 14:23:53 +01:00
Robin Gareus 344d163875 Use libc++/clang on OSX 10.10.x 2021-01-10 14:05:09 +01:00
Robin Gareus caf55e105e
Dynamically load Dr.Mingw
This improves compatibility with older systems, notably 32bit WinXP.
2021-01-02 23:19:40 +01:00
Robin Gareus cd72bbb2d4
Make AVX/FMA support optional
Older compilers do not yet have fmaintrin.h. This fixes compile errors:
```
x86_functions_fma.cc:51:39: error: '_mm_fmadd_ss' was not declared in this scope
x86_functions_fma.cc:85:35: error: '_mm256_fmadd_ps' was not declared in this scope
x86_functions_fma.cc:106:35: error: '_mm256_fmadd_ps' was not declared in this scope
x86_functions_fma.cc:129:39: error: '_mm_fmadd_ss' was not declared in this scope
```
2021-01-02 16:41:43 +01:00
Ayan Shafqat 407882d23d
Add support for Intel/AMD's FMA extension
By supporting FMA extension, the number of instruction needed
for multiply accumulate to mix channels are reduced. Since,
this extension has been around since middle of 2012, more
computers have this instruction set available.
2021-01-01 21:05:16 +01:00
Robin Gareus 4f62726193
Set BigSur version compatibility 2020-12-18 14:51:07 +01:00
Robin Gareus 35c9b08154
Prepare for Apple/ARM cross-compile on Intel macOS 2020-12-12 04:47:21 +01:00
Robin Gareus 9cb9e58b31
Fix min OSX deplyoment target
mmacosx-version-min also needs to be set during linking, otherwise
the Finder will not allow to launch the application on older systems
  "The application requires os X 10.XX or later"
(with XX being the build-host's OS version), even though
Ardour can be started from a terminal on target due to correct
c/cxxflags.
2020-12-02 01:04:25 +01:00
Robin Gareus ee1434f47d
Fix macOS High Sierra build-target naming 2020-12-02 00:59:55 +01:00
Robin Gareus 3c25281203
Increase taglib version requirement
taglib-1.9 (Oct 2013) added support for INFO tags in WAV files.
2020-11-15 15:04:44 +01:00
Robin Gareus 921caac00f
Apple Big Sur build support 2020-11-10 23:28:54 +01:00
Robin Gareus 5ebb016544
Add support for Dr.Mingw 2020-09-29 06:06:11 +02:00
Robin Gareus 0ca0b4f335
VST3 skeleton 2020-09-16 22:49:19 +02:00
Robin Gareus 773a1a0725
Fix optimized armhf builds
Apparently gcc-6.2 with -O3 and -mfpu=neon can use ARM instructions
that requires 64bit alignment (here vst1.64) with data that
is not 64bit aligned (g->strcache) https://i.imgur.com/vYktsUn.png

So we need to be able to build "arm_neon_functions.cc" with
-mfpu=neon, while not automatically using NEON for the rest
of the codebase, unless explicitly asked for.
2020-08-22 02:35:19 +02:00
Robin Gareus 422d65ad17
Override FPU auto-detection for ARM builds 2020-08-21 06:21:09 +02:00
Robin Gareus cfae218b8a
Amend prev. commit (ARM FPU optimization configuration) 2020-08-21 03:48:03 +02:00
Robin Gareus fb5abde677
Use specific build-target for ARM/NEON routines 2020-08-21 03:39:56 +02:00
Robin Gareus 58a5e256a9
GNU libc 2.31 compatibility part two
This fixes underlinking against -lm and reverts the
prior workaround 83cd796a47.
2020-05-12 12:23:26 +02:00
Nils Philippsen 845d7d3a3b Recognize dist, distcheck better to set app name
Previously, `dist` had to be the first argument to waf. If it came in a
different position (e.g. `APPNAME=Ardour ./waf tarball dist`) or
`distcheck` was used instead of `dist`, the resulting archive was named
`noname-....tar.bz2`.

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2020-04-25 10:39:29 -06:00
Luciano Iam d694ee97c7
Update waf scripts 2020-04-09 20:56:46 +02:00
Robin Gareus 83cd796a47
GNU libc 2.31 compatibility
Optimized builds of Ardour use various _finite math methods
(due to -ffast-math). Those functions have apparently been
removed, and replaced with macros and are no longer available
in libm/libc++.

see also
https://discourse.ardour.org/t/a-eq-and-a-comp-fail-on-manjaro-xfce/103122
https://lists.gnu.org/archive/html/info-gnu/2020-02/msg00001.html
2020-03-30 22:41:11 +02:00
Robin Gareus 34e68fe5e2
Automatic backend selection, and fix backend option parsing
python ''.split(',') returns an array with an empty string,
it does not evaluate to false.
2020-03-28 14:56:29 +01:00
Robin Gareus e219a6cd1e
Source-tree consistency (headless tools at top-level)
This move ardour-lua session tool to top-level, next to
headless/hardev.
2020-03-26 19:00:41 +01:00
nia 9be75befbe Add support for NetBSD by generalizing BSD OS tests. 2020-03-26 09:39:44 -06:00
Robin Gareus a254ce22a8
Fix optimized mingw/gcc-8.2 builds
gcc-8.2 -O3 optimization enables -finline-functions.
For reasons yet unknown this causes issues with Glib::Threads::Private
when loading sessions (creating new ones is fine) and likely some
other operations.

Without this change the following happens (5.12 as well as current git)
when loading an existing session:

---
[Switching to Thread 6092.0x12fc]
Breakpoint 1, ARDOUR::SessionEvent::create_per_thread_pool (name=..., nitems=4096)
    at ../libs/ardour/session_events.cc:60
60      in ../libs/ardour/session_events.cc
$6 = (const std::__cxx11::string &) @0x210dfc60: {static npos = 18446744073709551615,
  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
    _M_p = 0x210dfc70 "GUI"}, _M_string_length = 3, {_M_local_buf = "GUI\000\000\000\000\000<E0>P<DA>:\000\000\000",
    _M_allocated_capacity = 4805959}}
#0  ARDOUR::SessionEvent::create_per_thread_pool (name=..., nitems=4096) at ../libs/ardour/session_events.cc:60
#1  0x0000000000434e77 in ?? ()

[..]

Thread 1 (Thread 6092.0x12fc):
#0  0x0000000061f152ef in PBD::RingBuffer<void*>::write (this=this@entry=0x50, src=src@entry=0x210dcdc8,
    cnt=cnt@entry=1) at ../libs/pbd/pbd/ringbuffer.h:170
#1  0x0000000061ee954d in push (t=<optimized out>, this=0x0) at ../libs/pbd/pool.cc:290
#2  CrossThreadPool::flush_pending_with_ev (this=0x0, ptr=<optimized out>) at ../libs/pbd/pool.cc:254
#3  0x00000000218d5b01 in operator() (a0=0x210dcdc8, this=0x48)
    at /home/ardour/win-stack-w64/include/boost/function/function_template.hpp:682
#4  operator()<boost::function<void(ARDOUR::SessionEvent*)>, boost::_bi::list0> (a=<synthetic pointer>, f=...,
    this=0x68) at /home/ardour/win-stack-w64/include/boost/bind/bind.hpp:259
#5  operator() (this=0x48) at /home/ardour/win-stack-w64/include/boost/bind/bind.hpp:1294
#6  boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<boost::_bi::unspecified, boost::function<void (ARDOUR::SessionEvent*)>, boost::_bi::list1<boost::_bi::value<ARDOUR::SessionEvent*> > >, void>::invoke(boost::detail::function::function_buffer&) (function_obj_ptr=...)
    at /home/ardour/win-stack-w64/include/boost/function/function_template.hpp:159
#7  0x0000000063e2dc39 in operator() (this=0x210dcf70)
    at /home/ardour/win-stack-w64/include/boost/function/function_template.hpp:682
#8  AbstractUI<Gtkmm2ext::UIRequest>::call_slot(PBD::EventLoop::InvalidationRecord*, boost::function<void ()> const&)
    (this=0x3ada50e0, invalidation=0x0, f=...) at ../libs/pbd/pbd/abstract_ui.cc:434
#9  0x00000000216cbb96 in ARDOUR::SessionEventManager::merge_event (this=<optimized out>, ev=<optimized out>)
    at /home/ardour/win-stack-w64/include/boost/function/function_template.hpp:507
#10 0x00000000216e3861 in non-virtual thunk to ARDOUR::Session::queue_event(ARDOUR::SessionEvent*) ()
    at ../../win-stack-w64/include/glibmm-2.4/glibmm/threads.h:709
#11 0x00000000216c91bf in ARDOUR::SessionEventManager::clear_events(ARDOUR::SessionEvent::Type, boost::function<void ()>) (this=this@entry=0x4256cc08, type=type@entry=ARDOUR::SessionEvent::Skip, after=...)
    at ../libs/ardour/session_events.cc:156
#12 0x000000002168874a in ARDOUR::Session::sync_locations_to_skips (this=this@entry=0x4256ca90)
    at /usr/lib/gcc/x86_64-w64-mingw32/8.3-posix/include/c++/new:169
#13 0x0000000021688802 in ARDOUR::Session::update_skips (this=this@entry=0x4256ca90, loc=loc@entry=0x0,
    consolidate=consolidate@entry=false) at ../libs/ardour/session.cc:1683
#14 0x0000000021699649 in _locations_changed (locations=..., this=0x4256ca90) at ../libs/ardour/session.cc:1859
#15 apply<ARDOUR::Session> (method=
    (void (ARDOUR::Session::*)(ARDOUR::Session * const, const ARDOUR::Locations::LocationList &)) 0x216994f0 <ARDOUR::Session::_locations_changed(std::__cxx11::list<ARDOUR::Location*, std::allocator<ARDOUR::Location*> > const&)>,
    obj=..., this=0x40ff4c60) at ../libs/ardour/ardour/location.h:240
#16 ARDOUR::Session::locations_changed (this=this@entry=0x4256ca90) at ../libs/ardour/session.cc:1840
#17 0x0000000021700abd in ARDOUR::Session::set_state (this=0x4256ca90, node=..., version=6000)
    at ../libs/ardour/session_state.cc:1657
#18 0x0000000021713456 in ARDOUR::Session::post_engine_init (this=this@entry=0x4256ca90) at ../libs/pbd/pbd/xml++.h:81
#19 0x00000000216ad5cd in ARDOUR::Session::Session (this=0x4256ca90, eng=..., fullpath=..., snapshot_name=...,
    bus_profile=<optimized out>, mix_template=...) at ../libs/ardour/session.cc:383
#20 0x000000000046db8b in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

---

Note that in the trace starting at #19 the source-file references
are offset :post_engine_init() isn't in xml++.h
(likely debug symbols are incorrect due to inline functions)

The application crashes due to #2 ::flush_pending_with_ev (this=0x0 ..)
But the earlier breakpoint above shows that the ThreadPool was
created, and this #11 ::clear_events() should not assign NULL.

(This happens on a single-core CPU, too)
2020-03-10 20:55:50 +01:00
Robin Gareus 6f29f45c81
Fix typo in f265bbbf82 2020-03-08 04:23:45 +01:00
Robin Gareus f265bbbf82
mingw/gcc-8.2 compat: _xgetbv() needs -mxsave
Otherwise this causes PBD::FPU to fail with
error: inlining failed in call to always_inline ‘long long int _xgetbv(unsigned int)’
2020-03-08 02:41:15 +01:00
Robin Gareus b0e7ba1262
Fix for modern boost + updated buildstack
Ardour's boost is not compiled --with-system, this causes issues
with modern compilers (gcc 8.2) when linking.
2020-03-08 02:38:30 +01:00
Robin Gareus ede853d791
NO-OP: whitespace 2020-03-08 02:32:07 +01:00
Robin Gareus 6fd27f89b3
Remove debug message 2020-03-06 01:44:32 +01:00
Robin Gareus 09d45eff42
Update boost-ptr debug patch for boost 1.67 2020-02-25 02:29:03 +01:00