Hi, please add this to your cmake build options:
-DMODULES_BUILD_STATIC=TRUE
Long ago MusE was built statically, monolithic style.
But now, by default it is built modular style, each cpp/h is
built as a module and the whole thing dynamically linked.
Many of the modules depend on each other.
Orcan may chime in here. I think he still may package MusE
for Fedora RPM. He added the modular build and static option.
*** Caveat: NOTE There are still some linker errors at the end:
-----------------------------------------------
...
[ 89%] Building CXX object muse/CMakeFiles/core.dir/structure.o
[ 89%] Building CXX object muse/CMakeFiles/core.dir/sync.o
[ 89%] Building CXX object muse/CMakeFiles/core.dir/synth.o
[ 89%] Building CXX object muse/CMakeFiles/core.dir/tempo.o
[ 89%] Building CXX object muse/CMakeFiles/core.dir/thread.o
[ 90%] Building CXX object muse/CMakeFiles/core.dir/ticksynth.o
[ 90%] Building CXX object muse/CMakeFiles/core.dir/track.o
[ 90%] Building CXX object muse/CMakeFiles/core.dir/transport.o
[ 90%] Building CXX object muse/CMakeFiles/core.dir/undo.o
[ 90%] Building CXX object muse/CMakeFiles/core.dir/value.o
[ 90%] Building CXX object muse/CMakeFiles/core.dir/vst.o
[ 90%] Building CXX object muse/CMakeFiles/core.dir/vst_native.o
[ 91%] Building CXX object muse/CMakeFiles/core.dir/wave.o
[ 91%] Building CXX object muse/CMakeFiles/core.dir/waveevent.o
[ 91%] Building CXX object muse/CMakeFiles/core.dir/wavetrack.o
[ 91%] Building CXX object muse/CMakeFiles/core.dir/xml.o
[ 91%] Building CXX object muse/CMakeFiles/core.dir/steprec.o
[ 91%] Building CXX object muse/CMakeFiles/core.dir/wavepreview.o
[ 91%] Linking CXX static library libmuse_core.a
[ 91%] Built target core
Scanning dependencies of target muse
[ 92%] Building CXX object muse/CMakeFiles/muse.dir/main.o
[ 92%] Linking CXX executable muse3
arranger/libmuse_arranger.a(arrangerview.o): In function
`MusEGui::ArrangerView::globalCut()':
arrangerview.cpp:(.text+0x1943): undefined reference to
`MusECore::globalCut(bool)'
arranger/libmuse_arranger.a(arrangerview.o): In function
`MusEGui::ArrangerView::globalInsert()':
arrangerview.cpp:(.text+0x1953): undefined reference to
`MusECore::globalInsert(bool)'
arranger/libmuse_arranger.a(arrangerview.o): In function
`MusEGui::ArrangerView::globalSplit()':
arrangerview.cpp:(.text+0x1963): undefined reference to
`MusECore::globalSplit(bool)'
arranger/libmuse_arranger.a(arrangerview.o): In function
`MusEGui::ArrangerView::globalCutSel()':
arrangerview.cpp:(.text+0x1976): undefined reference to
`MusECore::globalCut(bool)'
arranger/libmuse_arranger.a(arrangerview.o): In function
`MusEGui::ArrangerView::globalInsertSel()':
arrangerview.cpp:(.text+0x1986): undefined reference to
`MusECore::globalInsert(bool)'
arranger/libmuse_arranger.a(arrangerview.o): In function
`MusEGui::ArrangerView::globalSplitSel()':
arrangerview.cpp:(.text+0x1996): undefined reference to
`MusECore::globalSplit(bool)'
arranger/libmuse_arranger.a(pcanvas.o): In function
`MusEGui::PartCanvas::paste(bool, MusEGui::PartCanvas::paste_mode_t,
bool, int, int)':
pcanvas.cpp:(.text+0xe9ba): undefined reference to
`MusECore::movePartsTotheRight(unsigned int, int, bool,
std::set<MusECore::Track*, std::less<MusECore::Track*>,
std::allocator<MusECore::Track*> >*)'
pcanvas.cpp:(.text+0xee17): undefined reference to
`MusECore::movePartsTotheRight(unsigned int, int, bool,
std::set<MusECore::Track*, std::less<MusECore::Track*>,
std::allocator<MusECore::Track*> >*)'
arranger/libmuse_arranger.a(pcanvas.o): In function
`MusEGui::PartCanvas::cmd(int)':
pcanvas.cpp:(.text+0xf2a3): undefined reference to
`MusECore::movePartsTotheRight(unsigned int, int, bool,
std::set<MusECore::Track*, std::less<MusECore::Track*>,
std::allocator<MusECore::Track*> >*)'
collect2: error: ld returned 1 exit status
make[2]: *** [muse/CMakeFiles/muse.dir/build.make:145: muse/muse3] Error 1
make[1]: *** [CMakeFiles/Makefile2:461: muse/CMakeFiles/muse.dir/all]
Error 2
make: *** [Makefile:152: all] Error 2
-----------------------------------------------
I hope that those are the /only/ remaining errors and not
just the beginning of many more.
Big clue: All of those undefined functions are found in structure.cpp
and declared in structure.h
I examined all of the CmakeLists.txt files involved, but didn't
see any trouble.
I tried adding 'extern' to each of the declarations in structure.h,
but same errors.
Hmm... Checking.
Anyone else see anything?
Thanks.
Tim.
On 01/13/2018 04:58 PM, Tim wrote:
OK just built DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-undefined.
Observed the errors!
Hm, this is strange. The first error is this:
CMakeFiles/al.dir/sig.o: In function `AL::SigList::ticks_beat(int) const':
sig.cpp:(.text+0xc3): undefined reference to `MusEGlobal::config'
C
There's no problem with the sig module per se, it is just
simply referencing the config variable.
But the config variable is defined in another module, in gconfig.cpp
In gconfig.h it is declared as:
extern GlobalConfigValues config;
So... what are we supposed to do?
Hm. Checking...
Tim.
On 01/13/2018 03:57 PM, Tim wrote:
OK we just got /another/ report of this in the issue tracker,
someone packaging for Mandriva.
Hm. So IIUC this problem may be because of my (our?) habit,
perhaps incorrect, of forward referencing a lot of stuff
in header files, so that I don't have to bring in a lot of other
headers in that header file, so that changing one small thing
in some small header somewhere doesn't cause a big recompilation.
For example look at song.h, there are a lot of forward references.
I had always assumed this was OK, since the symbols are eventually
found within the .cpp file.
Ironically though, I was thinking heavily about the consequences
the other day - wondering if this habit might cause problems.
And here we are.
Does all this sound correct?
If so, then we have a *lot* of changing to do.
Or should we? Should the packagers do as the issue tracker
poster suggested he /could/ do and remove that strict
-no-undefined? He said this:
"Since all the involved references are internal to the muse sources.
this means that muse is actually rather underlinked. I can workaround
the issue by forcing our build system to pass only "-Wl,--as-needed"
"Perhaps this situation is safe, because all the needed symbols are
provided by other muse internal modules and consequently they are
always present, ruling out the chance of any runtime error; but I
would argue that it is better to have a properly linked program, if
this is doable..."
Tim.
On 01/13/2018 02:20 PM, Sebastian wrote:
On 01/13/2018 05:35 PM, Robert Jonsson wrote:
Thanks for packaging MusE.
First, if possible, add rtaudio as a dependency as it will allow
running MusE with other backends than Jack.
I can't as rtaudio is not available in official openSUSE repositories
(I guess because of license issues, it's only in a third-party repo)
As for the error I'm not sure what is going on, MusEGlobal::config
seems defined to me..
I see this is happening while you try to create the package, does it
occur already when running ./compile_muse.sh ?
Tim, you run openSUSE, right? Seen anything similar?
This is not an openSUSE issue. The problem occurs during linking (not
/compiling/). I'm not a C/C++ programmer but AFAI found out, the
/--no-undefined/ during linking makes the linking process more
strict. Without that flag, compilation works because the undefined
references are /ignored/. Which does not mean that they exist, they
reference may work after later linking steps but how that works is
beyond my knowledge. As this flag is used for all packages in
openSUSE that use cmake, I guess that muse
Try building muse with the cmake parameter
DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-undefined and you should get the
same errors.
Sebastian
P.S.: I don't see an issue with the comma, removing it gives this:
c++: error: unrecognized command line option '-Wl'; did you mean '-W'?
c++: error: unrecognized command line option '--no-undefined'; did
you mean '-Wno-undef'?
--
python programming - mail server - photo - video -https://sebix.at
cryptographic key athttps://sebix.at/DC9B463B.asc and on public
keyservers
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Lmuse-user mailing list
Lmuse-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lmuse-user
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Lmuse-user mailing list
Lmuse-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lmuse-user
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Lmuse-user mailing list
Lmuse-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lmuse-user