* Ubuntu font of wisdom
@ 2016-12-15 22:43 James K. Lowden
2016-12-16 21:41 ` Javier
0 siblings, 1 reply; 8+ messages in thread
From: James K. Lowden @ 2016-12-15 22:43 UTC (permalink / raw)
To: help-gnu-emacs
$ cat /etc/debian_version
stretch/sid
$ /usr/bin/emacs --version | grep 2[45]
GNU Emacs 24.5.1
$ /usr/local/bin/emacs --version | grep 2[45]
GNU Emacs 25.1.1
I just upgraded emacs from source (see makefile below for steps)
because 25 is not packaged for Ubuntu 16.04.1 LTS. Unfortuately, my
new version no longer has access to
DejaVu Sans Mono-10
which is what I usually use. Since the old version is still installed
and still uses that font, I know it's still installed and available.
What I don't know is how to get Emacs to use it.
On the old version, "describe-font" starts out this way:
name (opened by): -PfEd-DejaVu Sans
Mono-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1
full name: DejaVu Sans Mono:pixelsize=13:....
I guess it's an outline font because xfontsel does not report it.
My X server is XQuartz on macOS. I usually display emacs remotely using
ssh X forwarding.
Questions:
1. How to have version 24 report where it found its font?
2. How to configure version 25 the same way?
While I'm at it, the new version uses the ugly Motif-gray toolbar,
while the packaged version uses a much more attractive, colorful
toolbar (and puts the scrollabar on the right). Is that a build
option, or a theme of some kind?
A lot of the advice I've read in searching basically says how to
install fonts, and claims emacs will DTRT when that's done. I have the
font, and it is accessible. It's just not being accessed.
Many thanks.
--jkl
== Makefile (installation & build steps) ==
EMACS = emacs-25.1
SOURCES = /etc/apt/sources.list
TMPSRCS = /tmp/$(notdir $(SOURCES))
PATCH = $(TMPSRCS).diff
PKG.OPTIONS = --pkgname emacs --maintainer jkl --pkgversion 25.1
all: .checkinstall
.checkinstall: .update .build $(EMACS)/build/description-pak
(cd $(EMACS)/build && sudo checkinstall $(PKG.OPTIONS))
$(EMACS)/build/description-pak:
echo 'emacs is the new black' > $@
.update: .source-ok
sudo apt-get -y update
@touch $@
.source-ok: $(PATCH)
sudo patch < $(PATCH) $(SOURCES)
@touch $@
# apt update fails unless some sources are mentioned in sources.list
$(PATCH):
test -f $(TMPSRCS).orig || cp $(SOURCES) $(TMPSRCS).orig
chmod -w $(TMPSRCS).orig
sed -E 's/^# deb-src/deb-src/' $(SOURCES) > $(TMPSRCS)
diff -u $(TMPSRCS).orig $(TMPSRCS) > $(PATCH)~ || test $$? = 1
mv $(PATCH)~ $(PATCH)
.build: .fetched
mkdir -p $(EMACS)/build
(cd $(EMACS)/build && nohup ../configure > log)
(cd $(EMACS)/build && nohup make -j8 > log)
.fetched: $(EMACS).tar.xz
pax -Jrf $^
@touch $@
$(EMACS).tar.xz:
wget http://ftp.gnu.org/gnu/emacs/$(EMACS).tar.xz
.build-dep: .pre-checkinstall
sudo apt-get build-dep emacs24
@touch $@
.pre-checkinstall:
sudo apt install -y build-essential checkinstall
@touch $@
== EOF ==
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Ubuntu font of wisdom
2016-12-15 22:43 Ubuntu font of wisdom James K. Lowden
@ 2016-12-16 21:41 ` Javier
2016-12-17 5:29 ` James K. Lowden
0 siblings, 1 reply; 8+ messages in thread
From: Javier @ 2016-12-16 21:41 UTC (permalink / raw)
To: help-gnu-emacs
> While I'm at it, the new version uses the ugly Motif-gray toolbar,
> while the packaged version uses a much more attractive, colorful
> toolbar (and puts the scrollabar on the right).
It looks you are using different toolkits on 24 and 25 versions.
Look at the output of
M-x display-about-screen
This is what it says for me (compiled with the lucid toolkit):
GNU Emacs 24.5.50.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
What does it say for you on 24 and 25?
The available toolkits can be seen in the source code from ./configure --help:
--with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
gtk3, lucid or athena, motif, no)
If you have root access you can just download teh source from the GNU project
directly and istall in --prefix=/usr/local
If you dont have root privileges you can just install it in ~/local in
your homedir
wget http://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.gz
tar xzvf emacs-24.5.tar.gz
cd emacs-24.5
./configure --prefix=/usr/local ; make ; make instal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Ubuntu font of wisdom
2016-12-16 21:41 ` Javier
@ 2016-12-17 5:29 ` James K. Lowden
2016-12-17 6:02 ` Dan Espen
2016-12-18 21:32 ` Tomas Nordin
0 siblings, 2 replies; 8+ messages in thread
From: James K. Lowden @ 2016-12-17 5:29 UTC (permalink / raw)
To: help-gnu-emacs
On Fri, 16 Dec 2016 21:41:18 +0000 (UTC)
Javier <nospam@nospam.invalid> wrote:
> > While I'm at it, the new version uses the ugly Motif-gray toolbar,
> > while the packaged version uses a much more attractive, colorful
> > toolbar (and puts the scrollabar on the right).
>
> It looks you are using different toolkits on 24 and 25 versions.
> Look at the output of M-x display-about-screen
Thank you. Yes:
GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll
bars)
> The available toolkits can be seen in the source code
> from ./configure --help:
Yes, I read INSTALL more carefully today, and surmised I want GTK+.
Do you think if I successfully build with GTK+ that my fonts will
magically Just Work? That would be nice.
At the risk of going off-topic, I believe I've found the root of the
trouble, and it appears to be a bug in the configure script.
When I practiced on a virtual machine (same Ubuntu, but
installed more recently) I got a lovely GTK+ 25.1 build, with
no hiccups. Following the same instructions on my somewhat cruftier dev
box, I encountered problems: configure complained it can't find libpng.
Tedious inspection of the two configure.log files reveals the
difference: configure is attempting to use libpng16, despite it being
in an odd place.
gcc -o conftest \
-g3 \
-O2 \
-pthread \
-I/usr/include/librsvg-2.0 \
-I/usr/include/gdk-pixbuf-2.0 \
-I/usr/include/libpng12 \
-I/usr/include/cairo \
-I/usr/include/glib-2.0 \
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include \
-I/usr/include/pixman-1 \
-I/usr/include/freetype2 \
-I/usr/include/libpng12 \
-I/usr/local/anaconda/include/libpng16 \ <-- hello!
conftest.c \
-lpng16 \
-lz \
-lm \
-lX11
Apparently, configure traverses /usr/local for include files but not
libraries. Anaconda (the Python package manager)
uses /usr/loca/anaconda/{include,lib}. configure's test fails because
libpng16 is not on the default library search path:
$ find /usr/local/ -name '*png16*so'
/usr/local/anaconda/lib/libpng16.so
I don't see any way to exclude a directory from configure's search
path. I'm grateful for the many years between today and the last time
I was responsible for a configure.ac. I can report configure is
broken: it should either not use anaconda's tree, or it should use both
forks.
What I will do for the nonce is rename the directory
to /usr/local/..anaconda, or move it out of the way, and see if
configure can find its way.
Other suggestions?
--jkl
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Ubuntu font of wisdom
2016-12-17 5:29 ` James K. Lowden
@ 2016-12-17 6:02 ` Dan Espen
2016-12-17 17:04 ` James K. Lowden
2016-12-18 21:32 ` Tomas Nordin
1 sibling, 1 reply; 8+ messages in thread
From: Dan Espen @ 2016-12-17 6:02 UTC (permalink / raw)
To: help-gnu-emacs
"James K. Lowden" <jklowden@speakeasy.net> writes:
> On Fri, 16 Dec 2016 21:41:18 +0000 (UTC)
> Javier <nospam@nospam.invalid> wrote:
>
>> > While I'm at it, the new version uses the ugly Motif-gray toolbar,
>> > while the packaged version uses a much more attractive, colorful
>> > toolbar (and puts the scrollabar on the right).
>>
>> It looks you are using different toolkits on 24 and 25 versions.
>> Look at the output of M-x display-about-screen
>
> Thank you. Yes:
>
> GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
> GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll
> bars)
>
>> The available toolkits can be seen in the source code
>> from ./configure --help:
>
> Yes, I read INSTALL more carefully today, and surmised I want GTK+.
> Do you think if I successfully build with GTK+ that my fonts will
> magically Just Work? That would be nice.
>
> At the risk of going off-topic, I believe I've found the root of the
> trouble, and it appears to be a bug in the configure script.
>
> When I practiced on a virtual machine (same Ubuntu, but
> installed more recently) I got a lovely GTK+ 25.1 build, with
> no hiccups. Following the same instructions on my somewhat cruftier dev
> box, I encountered problems: configure complained it can't find libpng.
>
> Tedious inspection of the two configure.log files reveals the
> difference: configure is attempting to use libpng16, despite it being
> in an odd place.
>
> gcc -o conftest \
> -g3 \
> -O2 \
> -pthread \
> -I/usr/include/librsvg-2.0 \
> -I/usr/include/gdk-pixbuf-2.0 \
> -I/usr/include/libpng12 \
> -I/usr/include/cairo \
> -I/usr/include/glib-2.0 \
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include \
> -I/usr/include/pixman-1 \
> -I/usr/include/freetype2 \
> -I/usr/include/libpng12 \
> -I/usr/local/anaconda/include/libpng16 \ <-- hello!
> conftest.c \
> -lpng16 \
> -lz \
> -lm \
> -lX11
>
> Apparently, configure traverses /usr/local for include files but not
> libraries. Anaconda (the Python package manager)
> uses /usr/loca/anaconda/{include,lib}. configure's test fails because
> libpng16 is not on the default library search path:
>
> $ find /usr/local/ -name '*png16*so'
> /usr/local/anaconda/lib/libpng16.so
>
> I don't see any way to exclude a directory from configure's search
> path. I'm grateful for the many years between today and the last time
> I was responsible for a configure.ac. I can report configure is
> broken: it should either not use anaconda's tree, or it should use both
> forks.
>
> What I will do for the nonce is rename the directory
> to /usr/local/..anaconda, or move it out of the way, and see if
> configure can find its way.
>
> Other suggestions?
On Fedora, I get libpng16 out of /usr/include and /usr/lib64.
I think you need to install a devel package like
libpng-devel.
--
Dan Espen
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Ubuntu font of wisdom
2016-12-17 6:02 ` Dan Espen
@ 2016-12-17 17:04 ` James K. Lowden
2016-12-17 17:53 ` Dan Espen
0 siblings, 1 reply; 8+ messages in thread
From: James K. Lowden @ 2016-12-17 17:04 UTC (permalink / raw)
To: help-gnu-emacs
On Sat, 17 Dec 2016 01:02:42 -0500
Dan Espen <despen@verizon.net> wrote:
> > I don't see any way to exclude a directory from configure's search
> > path. I'm grateful for the many years between today and the last
> > time I was responsible for a configure.ac. I can report configure
> > is broken: it should either not use anaconda's tree, or it should
> > use both forks.
...
> > Other suggestions?
>
> On Fedora, I get libpng16 out of /usr/include and /usr/lib64.
> I think you need to install a devel package like
> libpng-devel.
That was my first tack. At this stage of the game on Ubuntu LTS, GTK+
relies on png 12. You can have GTK3+ or png 16, but not both.
Your suggestion may illuminate part of the root of the problem,
though. Most packagers undoubtedly are running relatively new systems,
and have png 16 installed as a matter of course. And most Anaconda
usrs don't situate the package in /usr/local.
If I put my anaconda elsewhere or ran closer to the leading edge
(either one) my anaconda installation wouldn't have come into play,
because configure would have found /usr/local/lib/libpng16.so. It's
only the combination that manifests the defect.
--jkl
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Ubuntu font of wisdom
2016-12-17 17:04 ` James K. Lowden
@ 2016-12-17 17:53 ` Dan Espen
2016-12-17 18:59 ` James K. Lowden
0 siblings, 1 reply; 8+ messages in thread
From: Dan Espen @ 2016-12-17 17:53 UTC (permalink / raw)
To: help-gnu-emacs
"James K. Lowden" <jklowden@speakeasy.net> writes:
> On Sat, 17 Dec 2016 01:02:42 -0500
> Dan Espen <despen@verizon.net> wrote:
>
>> > I don't see any way to exclude a directory from configure's search
>> > path. I'm grateful for the many years between today and the last
>> > time I was responsible for a configure.ac. I can report configure
>> > is broken: it should either not use anaconda's tree, or it should
>> > use both forks.
> ...
>> > Other suggestions?
>>
>> On Fedora, I get libpng16 out of /usr/include and /usr/lib64.
>> I think you need to install a devel package like
>> libpng-devel.
>
> That was my first tack. At this stage of the game on Ubuntu LTS, GTK+
> relies on png 12. You can have GTK3+ or png 16, but not both.
That sounds odd, and maybe wrong.
I believe I have gtk3 on my system.
home> dnf list gtk3*
gtk3.x86_64 3.20.9-1.fc24...
What error message do you get?
In general, proper new versions don't conflict with old versions.
> Your suggestion may illuminate part of the root of the problem,
> though. Most packagers undoubtedly are running relatively new systems,
> and have png 16 installed as a matter of course. And most Anaconda
> usrs don't situate the package in /usr/local.
Yes, I believe using something for one package
specific to a particular package isn't the right
way to go.
Why are you using stuff in /usr/local at all?
The package manager shouldn't put stuff there.
> If I put my anaconda elsewhere or ran closer to the leading edge
> (either one) my anaconda installation wouldn't have come into play,
> because configure would have found /usr/local/lib/libpng16.so. It's
> only the combination that manifests the defect.
Still not clear on what you are up to, but you may want to adjust
the order things are retrieved with /usr/local closer to the front.
--
Dan Espen
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Ubuntu font of wisdom
2016-12-17 17:53 ` Dan Espen
@ 2016-12-17 18:59 ` James K. Lowden
0 siblings, 0 replies; 8+ messages in thread
From: James K. Lowden @ 2016-12-17 18:59 UTC (permalink / raw)
To: help-gnu-emacs
On Sat, 17 Dec 2016 12:53:14 -0500
Dan Espen <despen@verizon.net> wrote:
> Why are you using stuff in /usr/local at all?
> The package manager shouldn't put stuff there.
You're right, the package manager isn't putting stuff in /usr/local. I
am, as well I should. That's what it's there for.
Why is the emacs configure script traversing /usr/local in search of
include files? That's the more pertinent question to this list. The
behavior is wrong, even on its own terms. I just happened to have a
setup that exposes it.
> > If I put my anaconda elsewhere or ran closer to the leading edge
> > (either one) my anaconda installation wouldn't have come into play,
> > because configure would have found /usr/local/lib/libpng16.so. It's
> > only the combination that manifests the defect.
>
> Still not clear on what you are up to, but you may want to adjust
> the order things are retrieved with /usr/local closer to the front.
Gee, I thought it was pretty plain what I'm up to: installing emacs
from source. The configure script broke on my system and suggested
--no-png as an option. Since I knew I had libpng installed, and
couldn't upgrade it (under Ubuntu LTS as of December 2016),
I asked some questions here. That led to the discovery that configure
was using an include directory it had no right to.
configure has every reason to look in /usr/include
and /usr/local/include. There's no justification for rooting around
the entire /usr/local. Especially if it doesn't also do the same for
the associated library. The configure test is, simply, broken.
In the event, my workaround worked: I renamed the anaconda directory
to /usr/local/.anaconda. configure ignored it, and emacs built just
fine. As an added bonus, having read INSTALL carefully, I excluded the
dbus stuff and no longer see warnings when emacs starts up. I think I
just heard an angel get its wings.
Below, for the record, is the final Makefile I used. It prepares
Ubuntu to build packages, fetches and builds emacs, constructs a binary
Debian package (IIUC), and installs it. I hope it is useful to someone
else.
My original question was how to use the fonts I want. Kudos to Javier
for pointing me in the GTK direction, correctly suggesting that fixing
that would fix the font issue, too.
--jkl
== snip ==
EMACS = emacs-25.1
SOURCES = /etc/apt/sources.list
TMPSRCS = /tmp/$(notdir $(SOURCES))
PATCH = $(TMPSRCS).diff
PKG.OPTIONS = --pkgname emacs --maintainer jkl --pkgversion 25.1
all: .checkinstall
# construct & install emacs25 as a standard binary package
.checkinstall: .update .build $(EMACS)/build/description-pak
(cd $(EMACS)/build && sudo checkinstall $(PKG.OPTIONS))
$(EMACS)/build/description-pak:
echo 'emacs is the new black' > $@
# resynchronize the package index files from their sources
.update: .source-ok
sudo apt-get -y update
@touch $@
# Open the barn doors for source code repositories.
.source-ok: $(PATCH)
sudo patch < $(PATCH) $(SOURCES)
@touch $@
$(PATCH):
test -f $(TMPSRCS).orig || cp $(SOURCES) $(TMPSRCS).orig
chmod -w $(TMPSRCS).orig
sed -E 's/^# deb-src/deb-src/' $(SOURCES) > $(TMPSRCS)
diff -u $(TMPSRCS).orig $(TMPSRCS) > $(PATCH)~ || test $$? = 1
mv $(PATCH)~ $(PATCH)
# Use pretty GTK widgets & fonts. Because I always run emacs over
# remote X with ssh, disable all the dbus stuff. Otherwise emacs
# emits a buch of warnings on startup.
OPTIONS = --with-x-toolkit=gtk3 --with-toolkit-scroll-bars \
--without-dbus --without-gconf --without-gsettings
build: .build
.build: .fetched
mkdir -p $(EMACS)/build
(cd $(EMACS)/build && nohup ../configure $(OPTIONS) > log)
(cd $(EMACS)/build && nohup make -j8) > $@~
@mv $@~ $@
# fetch & unpack the tarball
.fetched: $(EMACS).tar.xz
sudo apt install pax
pax -Jrf $^
@touch $@
$(EMACS).tar.xz:
wget http://ftp.gnu.org/gnu/emacs/$(EMACS).tar.xz
# install emacs24 dependencies for use in emacs25
.build-dep: .pre-checkinstall
sudo apt-get build-dep emacs24
@touch $@
# prepare packaging system to build a packages
.pre-checkinstall:
sudo apt install -y build-essential checkinstall
@touch $@
== pins ==
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Ubuntu font of wisdom
2016-12-17 5:29 ` James K. Lowden
2016-12-17 6:02 ` Dan Espen
@ 2016-12-18 21:32 ` Tomas Nordin
1 sibling, 0 replies; 8+ messages in thread
From: Tomas Nordin @ 2016-12-18 21:32 UTC (permalink / raw)
To: James K. Lowden, help-gnu-emacs
"James K. Lowden" <jklowden@speakeasy.net> writes:
> libraries. Anaconda (the Python package manager)
Just want to point out, Anaconda is a python distribution aimed for
scientific computing, installing loads of 3:rd party packages in one go.
I think they call their package manager conda. Python's package manager
is called pip nowadays.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-12-18 21:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-15 22:43 Ubuntu font of wisdom James K. Lowden
2016-12-16 21:41 ` Javier
2016-12-17 5:29 ` James K. Lowden
2016-12-17 6:02 ` Dan Espen
2016-12-17 17:04 ` James K. Lowden
2016-12-17 17:53 ` Dan Espen
2016-12-17 18:59 ` James K. Lowden
2016-12-18 21:32 ` Tomas Nordin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).