Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help with Lyx and Lilypond?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Fri Oct 28, 2011 10:29 pm    Post subject: Help with Lyx and Lilypond? Reply with quote

So, I am apparently a bit of a geek about typesetting, so I really like that Lyx works pretty well. However, I would like to have musical examples in my documents, and lilypond seems to be the program for it. There's even a plugin for Lyx. However, when I try to enter even the most basic lilypond code into a document:

Code:
{
  c' e' g' e'
}


and try to export it, I get the following:
Code:
Running xelatex...xelatex: /usr/local/lilypond/usr/lib/libstdc++.so.6: no version information available (required by xelatex)
xelatex: /usr/local/lilypond/usr/lib/libstdc++.so.6: no version information available (required by xelatex)
xelatex: /usr/local/lilypond/usr/lib/libstdc++.so.6: no version information available (required by xelatex)
xelatex: /usr/local/lilypond/usr/lib/libstdc++.so.6: no version information available (required by /usr/lib64/libTECkit.so.0)
xelatex: /usr/local/lilypond/usr/lib/libstdc++.so.6: no version information available (required by /usr/lib64/libTECkit.so.0)
xelatex: /usr/local/lilypond/usr/lib/libstdc++.so.6: no version information available (required by /usr/lib64/libTECkit.so.0)
xelatex: /usr/local/lilypond/usr/lib/libstdc++.so.6: no version information available (required by /usr/lib64/libpoppler.so.18)
xelatex: /usr/local/lilypond/usr/lib/libstdc++.so.6: no version information available (required by /usr/lib64/libpoppler.so.18)
xelatex: /usr/local/lilypond/usr/lib/libstdc++.so.6: no version information available (required by /usr/lib64/libgraphite.so.3)
xelatex: /usr/local/lilypond/usr/lib/libstdc++.so.6: no version information available (required by /usr/lib64/libgraphite.so.3)
xelatex: /usr/local/lilypond/usr/lib/libstdc++.so.6: no version information available (required by /usr/lib64/libgraphite.so.3)
This is XeTeX, Version 3.1415926-2.3-0.9997.5 (TeX Live 2011)
 restricted \write18 enabled.
entering extended mode
(/tmp/tmpd9ojgb.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ar
abic, farsi, ukenglish, usenglishmax, german-x-2009-06-19, ngerman-x-2009-06-19
, german, ngerman, swissgerman, ancientgreek, ibycus, greek, monogreek, loaded.



Fontconfig error: Cannot load default config file
xelatex: relocation error: xelatex: symbol _ZNSt15_List_node_base7_M_hookEPS_, version GLIBCXX_3.4.14 not defined in file libstdc++.so.6 with link time reference
command failed: xelatex /tmp/tmpd9ojgb.tex
Child returned 127
lilypond-book (GNU LilyPond) 2.14.2
Systemcall.cpp(259): Systemcall: 'lilypond-book --safe --pdf --latex-program=xelatex --lily-output-dir=ly-pdf "ipse_dixit_-_mastersthese.lytex"' finished with exit code 1
Error: Cannot convert file
----------------------------------------
An error occurred while running:
lilypond-book --safe --pdf --latex-program=xelatex --lily-output-dir=ly-pdf


Can anybody help me untangle those error messages? I can run lilypond on *.ly files just fine, so I suspect it's something to do with how it's interacting with xelatex. On an added note, these errors even occur when I have no actual lilypond code in the document. Loading the lilypond-book module causes export to fail.

Thanks,

EE
Back to top
View user's profile Send private message
MotivatedTea
Apprentice
Apprentice


Joined: 06 Nov 2006
Posts: 269
Location: Toronto, Canada

PostPosted: Sat Oct 29, 2011 6:59 am    Post subject: Reply with quote

The error messages are about shared libraries, and about libstdc++. It looks like you either have a shared library problem or something's funny with your GCC config. Try the following things. (As a gentoo user, you probably know about these already, but the error message you're getting suggests you might have forgotten one of them.)
  • Run revdep-rebuild!
  • What does "gcc-config -l" (as root) output? If no version of gcc is selected, set one. If you have recently upgraded gcc versions, did you remember to run fix_libtool_files.sh? For example, I recently upgraded from gcc 4.4.5 to gcc 4.5.3. After selecting the new gcc (using gcc-config), I had to run "fix_libtool_files.sh 4.4.5". (When you run it, you give it the version number of the old GCC version you are switching away from.)
  • If you have libstdc++ installed, re-install it then run revdep-rebuild again. (If you don't have it installed, skip this step.)


I suspect revdep-rebuild will fix your problems. Based on the error messages you're getting, I suspect revdep-rebuild will re-emerge app-text/teckit, app-text/poppler, media-libs/silgraphite, and possibly dev-texlive/texlive-latex.
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Sat Oct 29, 2011 10:59 am    Post subject: Reply with quote

Hi there,

revdep-rebuild returned nothing, and reinstalling libstdc++ didn't help, either.

What I think is happening is this: xelatex is using the libstdc++ library that lilypond installed for itself, and not the global one. I'm not sure why that's happening, though, or how to tell it to do otherwise. Adding the lilypond-book module to Lyx changes the document class, and part of that probably involves adding the /usr/local/lilypond path to the global search path.

But I'm just speculating.

At any rate, alas! none of that helped, but thank you for the advice.

Cheers,

EE
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Sat Oct 29, 2011 11:14 am    Post subject: Reply with quote

You installed something manually without portage - looks like lilypond, probably also some dependencies. Remove it (them) and use portage to install lilypond in "the gentoo way".
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Sat Oct 29, 2011 11:48 am    Post subject: Reply with quote

The gentoo version of lilypond is two versions out of date, and fails on install:

Code:
>> proofing
! Unknown relation will be considered false.
<to be read again>
                   :
breapth_endchar->...s.extra_endchar;if.proofing>0:
                                                  makebox_with_breapth(proof...

fet_endchar->...metric_output_char;breapth_endchar
                                                  ;
l.25 fet_endchar
                ;
[221]
@{puorg@:dots@}
)
@{tnof@})
(see the transcript file for additional information)
189 output files written: parmesan23.33 .. parmesan23.221
Transcript written on parmesan23.log.
mf2pt1: "mpost -mem=mf2pt1 -progname=mpost '\mode:=localfont; mag:=100; bpppix 0.02; input parmesan23.mf'" failed (No such file or directory)
/var/tmp/portage/media-sound/lilypond-2.12.3/work/lilypond-2.12.3/scripts/build/out/gen-emmentaler-scripts --dir=./out
cd ./out && /usr/bin/fontforge -script emmentaler-11.pe
Copyright (c) 2000-2011 by George Williams.
 Executable based on sources from 13:48 GMT 22-Feb-2011.
 Library based on sources from 13:48 GMT 22-Feb-2011.
Cannot open /var/tmp/portage/media-sound/lilypond-2.12.3/work/lilypond-2.12.3/mf/out/feta11.pfb
The requested file, feta11.pfb, does not exist
MergeFonts: Can't find font: feta11.pfb
Called from...
 emmentaler-11.pe: line 17
make[1]: *** [out/emmentaler-11.otf] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-sound/lilypond-2.12.3/work/lilypond-2.12.3/mf'
make: *** [all] Error 2
emake failed
 * ERROR: media-sound/lilypond-2.12.3 failed (compile phase):
 *   emake failed
 *
 * Call stack:
 *     ebuild.sh, line  91:  Called src_compile
 *   environment, line 6142:  Called die
 * The specific snippet of code:
 *       emake -j1 || die "emake failed";
 *
 * If you need support, post the output of 'emerge --info =media-sound/lilypond-2.12.3',
 * the complete build log and the output of 'emerge -pqv =media-sound/lilypond-2.12.3'.
 * The complete build log is located at '/var/tmp/portage/media-sound/lilypond-2.12.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-sound/lilypond-2.12.3/temp/environment'.
 * S: '/var/tmp/portage/media-sound/lilypond-2.12.3/work/lilypond-2.12.3'


The version current on the lilypond website is 2.14.2-1, which is why I installed it instead. Now, I'm all for trying to make my own ebuild for it, but I don't know how to do that. Are you suggesting I go that route?

Thanks,

EE
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Sat Oct 29, 2011 2:49 pm    Post subject: Reply with quote

similar bug?
https://bugs.gentoo.org/show_bug.cgi?id=380155
Copy last lilypond ebuild to your overlay, edit filename to match recent release (note: 2.14 is stable, 2.15 is testing/unstable!), remove the patches from the ebuild. According to the linked bugreport, this makes lilypond compile.
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Sat Oct 29, 2011 3:13 pm    Post subject: Reply with quote

okay, I'm apparently stupid. I downloaded the ebuild attached to the bugreport, and ran
Code:
 ebuild lilypond-2.14.1.ebuild digest

but that tried to download a tar.gz file into the main portage tree from one of the portage mirrors, thus:
Code:
>>> Downloading 'ftp://de-mirror.org/distro/gentoo/distfiles/lilypond-2.14.1.tar.gz'
--2011-10-29 17:07:18--  ftp://de-mirror.org/distro/gentoo/distfiles/lilypond-2.14.1.tar.gz
           => `/usr/portage/distfiles/lilypond-2.14.1.tar.gz'
Resolving de-mirror.org... 87.106.54.147
Connecting to de-mirror.org|87.106.54.147|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /distro/gentoo/distfiles ...
No such directory `distro/gentoo/distfiles'.
despite that the ebuild says:
Code:
SRC_URI="http://download.linuxaudio.org/lilypond/sources/v$(get_version_component_range 1-2)/${P}.tar.gz

Do I need to specify the version (stable is currently 2.14.2-1) manually?

Thanks,

EE
EDIT: uh ... maybe I could just, like, download the tarball manually into the /distfiles directory. It's compiling now.
Back to top
View user's profile Send private message
papapenguin
l33t
l33t


Joined: 20 Sep 2005
Posts: 694
Location: Bellevue

PostPosted: Sun Feb 12, 2012 6:34 am    Post subject: Reply with quote

ExecutorElassus, did you ever get lilypond to compile?

what steps did you use to get (and where did you download) the tarball?

thanks
_________________
--------------
Compaq Presario V6120US
AMD Turion 64X2
------------------------
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Sun Feb 12, 2012 9:59 am    Post subject: Reply with quote

media-sound/lilypond-2.14.2.ebuild
Code:
EAPI="3"

PYTHON_DEPEND="2"

inherit eutils versionator toolchain-funcs elisp-common flag-o-matic python autotools

DESCRIPTION="GNU Music Typesetter"
SRC_URI="http://download.linuxaudio.org/lilypond/sources/v$(get_version_component_range 1-2)/${P}.tar.gz"
HOMEPAGE="http://lilypond.org/"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="amd64 ~hppa x86"

IUSE="debug emacs profile"

RDEPEND="media-fonts/urw-fonts
        >=media-libs/freetype-2
        media-libs/fontconfig
        >=x11-libs/pango-1.12.3
        >=dev-scheme/guile-1.8.2[deprecated,regex]
        || ( >=app-text/ghostscript-gnu-8.15
                 >=app-text/ghostscript-gpl-8.15 )
        emacs? ( virtual/emacs )"

DEPEND="${RDEPEND}
        >=media-gfx/fontforge-20070501
        dev-texlive/texlive-metapost
        app-text/t1utils
        >=app-text/mftrace-1.2.9
        >=sys-apps/texinfo-4.11
        sys-devel/make
        sys-devel/gettext
        sys-devel/flex
        dev-lang/perl
        >=sys-devel/bison-2.0"

pkg_setup() {
        python_set_active_version 2
}

src_prepare() {
        epatch "${FILESDIR}/${PN}-2.12.3-qa_pyc_fix.patch"
        eautoreconf
}

src_configure() {
        if [[ $(gcc-major-version) -lt 4 ]]; then
                eerror "You need GCC 4.x to build this software."
                die "you need to compile with gcc-4 or later"
        fi

        if use profile; then
                einfo "Stripping -fomit-frame-pointer flag"
                strip-flags -fomit-frame-pointer
        fi

        econf $(use_enable debug debugging) \
                $(use_enable profile profiling) \
                --disable-gui \
                --disable-documentation
}

src_compile() {
        # without -j1 it will not fail, but building docs later will, bug 236010
        emake -j1 || die "emake failed"

        if use emacs; then
                elisp-compile elisp/lilypond-{font-lock,indent,mode,what-beat}.el \
                        || die "elisp-compile failed"
        fi
}

# lilypond doesn't include the answers to the tests.
# You are supposed to build those yourself with an
# earlier version. Then running tests will compare the
# results of the tests against the results from the
# earlier version. As such, tests seem mostly useless
# for our purposes.
RESTRICT=test

src_install() {
        emake DESTDIR="${D}" vimdir=/usr/share/vim/vimfiles install || die "emake install failed"

        # remove elisp files since they are in the wrong directory
        rm -rf "${D}"/usr/share/emacs

        if use emacs; then
                elisp-install ${PN} elisp/*.{el,elc} elisp/out/*.el \
                        || die "elisp-install failed"
                elisp-site-file-install "${FILESDIR}"/50${PN}-gentoo.el
        fi

        dodoc AUTHORS.txt HACKING NEWS.txt README.txt || die

        python_convert_shebangs -r 2 "${D}"
}

pkg_postinst() {
        use emacs && elisp-site-regen
}

pkg_postrm() {
        use emacs && elisp-site-regen
}

Put it in your local overlay, together with the required patches from lilypond in gentoo (portage will tell you if a patch is missing). Here it pulled the sources on its own. If it does not for you, the project page would be a good start: www.lilypond.org
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Sun Feb 12, 2012 11:25 am    Post subject: Reply with quote

I did, in fact, manage to get lilypond to compile (I just had to download the source manually). However, the ebuild file franzf provided is failing with the following:

Code:
# ebuild lilypond-2.14.2.ebuild manifest
/usr/local/portage/media-sound/lilypond/lilypond-2.14.2.ebuild: line 70: syntax error near unexpected token `||'
/usr/local/portage/media-sound/lilypond/lilypond-2.14.2.ebuild: line 70: `                        || die "elisp-compile failed" '
 * ERROR: media-sound/lilypond-2.14.2 failed (depend phase):
 *   error sourcing ebuild
 *
 * Call stack:
 *   ebuild.sh, line 521:  Called die
 * The specific snippet of code:
 *                      source "$EBUILD" || die "error sourcing ebuild"
 *
 * If you need support, post the output of 'emerge --info =media-sound/lilypond-2.14.2',
 * the complete build log and the output of 'emerge -pqv =media-sound/lilypond-2.14.2'.
 * This ebuild is from an overlay named 'x-portage': '/usr/local/portage/'
 * S: '/var/tmp/portage/media-sound/lilypond-2.14.2/work/lilypond-2.14.2'
(this is obviously just trying to rebuild the digest; I haven't tried compiling your version yet.)

Cheers,

EE
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Sun Feb 12, 2012 11:51 am    Post subject: Reply with quote

Code:
# ebuild /var/paludis/repositories/local/media-sound/lilypond/lilypond-2.14.2.ebuild digest
Appending /var/paludis/repositories/local to PORTDIR_OVERLAY...
>>> Creating Manifest for /var/paludis/repositories/local/media-sound/lilypond

It often makes trouble, when copy&pasting text from a browser to a text file.
My ebuild is just the lilypond-2.12.3 from portage, edited in the folling way:
Code:
diff -u /var/paludis/repositories/gentoo/media-sound/lilypond/lilypond-2.12.3.ebuild /var/paludis/repositories/local/media-sound/lilypond/lilypond-2.14.2.ebuild
--- /var/paludis/repositories/gentoo/media-sound/lilypond/lilypond-2.12.3.ebuild        2011-10-08 20:51:54.000000000 +0200
+++ /var/paludis/repositories/local/media-sound/lilypond/lilypond-2.14.2.ebuild 2012-01-31 11:27:36.930396688 +0100
@@ -44,9 +44,7 @@
 }
 
 src_prepare() {
-       epatch "${FILESDIR}/${P}-qa_pyc_fix.patch"
-       epatch "${FILESDIR}/${P}-python-cflags.patch"
-       epatch "${FILESDIR}/${P}-gcc45.patch"
+       epatch "${FILESDIR}/${PN}-2.12.3-qa_pyc_fix.patch"
        eautoreconf
 }

remove python-cflags and gcc45 patches and edit the line containing the qa_pyc_fix.patch (we build 2.14.2, and the patch for 2.12.3 still applies fine)
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Sun Feb 12, 2012 12:49 pm    Post subject: Reply with quote

your ebuild compiles just fine, and I can convert an example file into pdf output. So, I suppose I could say it works (though I can't bouch for specific features).

Thanks!

EE
Back to top
View user's profile Send private message
papapenguin
l33t
l33t


Joined: 20 Sep 2005
Posts: 694
Location: Bellevue

PostPosted: Sun Apr 01, 2012 12:44 am    Post subject: Reply with quote

I saw what my problem was, I needed to eselect python 2.7, then emerge lilypond...
_________________
--------------
Compaq Presario V6120US
AMD Turion 64X2
------------------------
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum