From: Ken Brown <kbrown@cornell.edu>
To: Bhavin Gandhi <bhavin7392@gmail.com>, Eli Zaretskii <eliz@gnu.org>
Cc: 52376@debbugs.gnu.org, akrl@sdf.org
Subject: bug#52376: 28.0.90; libdir is missing from native-comp-eln-load-path with GTK3 build
Date: Sat, 1 Jan 2022 12:26:50 -0500 [thread overview]
Message-ID: <f09d3d09-83fd-2692-1f30-579d36b64862@cornell.edu> (raw)
In-Reply-To: <CAOn=hbfrVM0j3bVpLw=w7FkiF+V23Ez_ZbrEzXs29+AWw83MyQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]
On 1/1/2022 12:12 PM, Bhavin Gandhi wrote:
> When all three variants are built, the make install is run from
> build-gtk directory at the end. And during this install command, it is
> creating a emacs.pdmp again, where build says Loading foo only.
>
> Can be reproduced with following commands:
>
> mkdir build-gtk
> cd build-gtk/
> ln -s ../configure .
> ./configure <for GTK>
> make bootstrap
> make
> cd ..
>
> mkdir build-nox
> cd build-nox/
> ln -s ../configure .
> ./configure <for No-X>
> make bootstrap
> make
>
> cd ../build-gtk
> sudo make install
> ^^^ This runs configure, make all lib etc again, I can see a new
> emacs.pdmp file being created which loads foo.el from source.
>
> Is this type of build and install flow supported?
>
> AFAIK, the RPM build requires the all build commands to be together in
> one section, and then all install related commands in a separate
> section. That's why this kind of flow is being used it seems.
>
> Two workarounds I can think of are,
> 1. Build GTK at the end and then do make install from build-gtk
> 2. Extract the source tar in different directories to keep these builds
> completely separate from each other.
In case it's of any use to you, I can show you how I handle this on Cygwin. We
use a tool called cygport, which processes a file emacs.cygport (attached). You
can think of this as the analogue of an rpm .spec file. I realize that you're
not familiar with cygport, but emacs.cygport is a bash script, and I suspect you
can decipher most of it. The crucial things to look at are the src_compile and
src_install functions.
Ken
[-- Attachment #2: emacs.cygport --]
[-- Type: text/plain, Size: 8534 bytes --]
NAME="emacs"
VERSION="28.0.90"
RELEASE="7"
HOMEPAGE="http://www.gnu.org/software/emacs/"
CATEGORY="Editors Interpreters"
DESCRIPTION="Emacs is a powerful, customizable, self-documenting, modeless text
editor. Emacs contains special code editing features, a scripting
language (elisp), and the capability to read mail, news, and more
without leaving the editor."
# emacs-basic is alphabetically first among the binary packages and so
# will be selected by setup if the user installs emacs but doesn't
# choose a binary package.
PKG_NAMES="${PN} ${PN}-common ${PN}-basic ${PN}-gtk ${PN}-lucid ${PN}-w32"
emacs_CATEGORY="${CATEGORY} Virtual"
emacs_CONTENTS=""
emacs_REQUIRES="emacs-bin"
emacs_SUMMARY="The extensible, customizable, self-documenting real-time display editor"
emacs_basic_SUMMARY="Emacs binaries with no GUI"
emacs_basic_REQUIRES="emacs-common"
emacs_basic_PROVIDES="emacs-bin"
emacs_basic_DESCRIPTION="${DESCRIPTION}
This package provides binaries for a non-GUI emacs."
EMACS_EXECDIR=usr/libexec/emacs/${VERSION}/${ARCH}-pc-cygwin
emacs_common_SUMMARY="Common files needed for all Emacs binaries"
emacs_common_OBSOLETES="emacs-el"
emacs_common_REQUIRES="terminfo-extra mailutils"
emacs_common_DESCRIPTION="${DESCRIPTION}
This package contains files and documentation needed by the binary
packages emacs-basic, emacs-gtk, emacs-lucid, and emacs-w32."
# /etc/postinstall/emacs.sh is created by cygport because of the
# presence of an icon.
emacs_common_CONTENTS="
etc/postinstall/emacs.sh
usr/bin/ebrowse.exe
usr/bin/emacs.ico
usr/bin/make-emacs-shortcut
usr/bin/set-emacs-default.sh
usr/include/
usr/lib/systemd/
${EMACS_EXECDIR}/hexl.exe
${EMACS_EXECDIR}/rcs2log
usr/share/
var/lib/rebase/dynpath.d/emacs"
# Use package lists for the remaining packages so we can add the
# appropriate native-lisp directory at compile time.
emacs_gtk_SUMMARY="Emacs binaries using the X11 GUI with the GTK+ toolkit"
emacs_gtk_OBSOLETES="emacs-X11"
emacs_gtk_REQUIRES="emacs-common bitstream-vera-fonts"
emacs_gtk_PROVIDES="emacs-bin"
emacs_gtk_DESCRIPTION="${DESCRIPTION}
This package provides binaries for an gtk emacs with the GTK+ toolkit.
Install it if you want to run emacs using the X window system and GTK+
for display. The binaries also can be used in non-gtk mode."
emacs_lucid_SUMMARY="Emacs binaries using the X11 GUI with the Lucid toolkit"
emacs_lucid_REQUIRES="emacs-common bitstream-vera-fonts"
emacs_lucid_PROVIDES="emacs-bin"
emacs_lucid_DESCRIPTION="${DESCRIPTION}
This package provides binaries for an X11 emacs with the Lucid
toolkit. Install it if you want to run emacs using the X window
system and Lucid for display. The binaries also can be used in
non-X11 mode."
emacs_w32_SUMMARY="Emacs binaries using the native Windows GUI"
emacs_w32_REQUIRES="emacs-common"
emacs_w32_PROVIDES="emacs-bin"
emacs_w32_DESCRIPTION="${DESCRIPTION}
This package provides emacs binaries that use the native Windows GUI
for display."
# SRC_URI="mirror://gnu/emacs/emacs-${VERSION}.tar.xz"
SRC_URI="https://alpha.gnu.org/gnu/emacs/pretest/emacs-${VERSION}.tar.xz"
# SRC_URI="https://alpha.gnu.org/gnu/emacs/pretest/emacs-${VERSION}-rc2.tar.xz"
# Can generate a source tarball by running './make-dist --snapshot
# --xz --tests' in git repo. Note: It’s possible to have an
# outdated loaddefs.el in this way. See admin/make-tarball.txt for
# more careful instructions on making the tarball. It might suffice
# to run ’make -C lisp autoloads’ first.
# GIT_URI="git://git.savannah.gnu.org/emacs.git"
# GIT_BRANCH="emacs-28"
# GIT_REV=fa0b34b716
# inherit git
SRC_URI+="
make-emacs-shortcut
set-emacs-default.sh
README.Cygwin
"
PATCH_URI="bt.patch"
PATCH_URI+=" no_dialog_on_abort.patch"
PATCH_URI+=" 0001-Avoid-delays-waiting-for-input-on-systems-without-SI.patch"
PATCH_URI+=" 0002-Make-process_pending_signals-useful-on-systems-witho.patch"
PATCH_URI+=" 0001-Make-the-installed-pmdp-file-use-a-fingerprint.patch"
PATCH_URI+=" 0001-Change-fingerprint-to-output-to-stdout.patch"
DOCS="README.Cygwin"
# For emacs-29 we'll also want libfribidi-devel, libwebp-devel, and
# libsqlite3-devel.
BUILD_REQUIRES=" \
libSM-devel \
libX11-devel \
libX11-xcb-devel \
libXaw3d-devel \
libXft-devel \
libXpm-devel \
libXpm-noX-devel \
libXrender-devel \
libdbus1-devel \
libfontconfig-devel \
libfreetype-devel \
libgccjit0 \
libgif-devel \
libglib2.0-devel \
libgnutls-devel \
libgtk3-devel \
libharfbuzz-devel \
libiconv-devel \
libjansson-devel \
libjpeg-devel \
liblcms2-devel \
libm17n-devel \
libncurses-devel \
libotf-devel \
libpng-devel \
librsvg2-devel \
libtiff-devel \
libxml2-devel"
DIFF_EXCLUDES="loaddefs.el config.in *.elc loaddefs.el~ subdirs.el~ config.in~ emacs.1 *.info"
ACLOCAL_FLAGS='-I m4'
# NATIVE_COMP=yes
NATIVE_COMP=no
if [ ${NATIVE_COMP} = yes ]
then
CYGCONF_ARGS="--with-native-compilation"
fi
WANT_AUTOCONF=2.7
src_compile() {
cd ${S}
cygautoreconf
# ./autogen.sh
cd ${B}
for t in basic w32 gtk lucid
do
mkdir ../build-${t}
cat > ${C}/emacs-${t}.list <<-EOF
usr/bin/emacs-${t}.exe
usr/bin/emacsclient-${t}.exe
usr/bin/set-emacs-default-${t}.sh
etc/postinstall/emacs-${t}.sh
etc/preremove/emacs-${t}.sh
EOF
done
cd ${B}/../build-w32
cygconf --with-w32
cygmake
echo "${EMACS_EXECDIR}/emacs-$(src/emacs --fingerprint).pdmp" \
>> ${C}/emacs-w32.list
if [ ${NATIVE_COMP} = yes ]
then
echo "usr/lib/emacs/${VERSION}/native-lisp/$(ls native-lisp)" \
>> ${C}/emacs-w32.list
fi
cd ${B}/../build-gtk
cygconf
cygmake
echo "${EMACS_EXECDIR}/emacs-$(src/emacs --fingerprint).pdmp" \
>> ${C}/emacs-gtk.list
if [ ${NATIVE_COMP} = yes ]
then
echo "usr/lib/emacs/${VERSION}/native-lisp/$(ls native-lisp)" \
>> ${C}/emacs-gtk.list
fi
cd ${B}/../build-lucid
cygconf --with-x-toolkit=lucid
cygmake
echo "${EMACS_EXECDIR}/emacs-$(src/emacs --fingerprint).pdmp" \
>> ${C}/emacs-lucid.list
if [ ${NATIVE_COMP} = yes ]
then
echo "usr/lib/emacs/${VERSION}/native-lisp/$(ls native-lisp)" \
>> ${C}/emacs-lucid.list
fi
cd ${B}/../build-basic
cygconf --with-x=no
cygmake
echo "${EMACS_EXECDIR}/emacs-$(src/emacs --fingerprint).pdmp" \
>> ${C}/emacs-basic.list
if [ ${NATIVE_COMP} = yes ]
then
echo "usr/lib/emacs/${VERSION}/native-lisp/$(ls native-lisp)" \
>> ${C}/emacs-basic.list
fi
}
src_install() {
cd ${B}/../build-basic
cyginstall
rm -fv \
${D}/usr/bin/emacs.exe \
${D}/usr/bin/ctags.exe \
${D}/usr/bin/etags.exe \
${D}/usr/share/man/man1/ctags* \
${D}/usr/share/man/man1/etags*
mv ${D}/usr/bin/{${P}.exe,emacs-basic.exe}
mv ${D}/usr/bin/{emacsclient.exe,emacsclient-basic.exe}
if [ ${NATIVE_COMP} = yes ]
then
dodir /usr/lib/emacs/${VERSION}/native-lisp
fi
insinto /${EMACS_EXECDIR}
for t in w32 gtk lucid
do
newbin ${B}/../build-${t}/src/emacs.exe emacs-${t}.exe
newbin ${B}/../build-${t}/lib-src/emacsclient.exe emacsclient-${t}.exe
fingerprint=$(${B}/../build-${t}/src/emacs --fingerprint)
newins ${B}/../build-${t}/src/emacs.pdmp emacs-${fingerprint}.pdmp
if [ ${NATIVE_COMP} = yes ]
then
cp -R ${B}/../build-${t}/native-lisp/${VERSION}-* \
${D}/usr/lib/emacs/${VERSION}/native-lisp
fi
done
cd ${S}
dobin make-emacs-shortcut
dobin set-emacs-default.sh
insinto /usr/bin
doins nt/icons/emacs.ico
insinto /usr/share/${PN}/${PV}/etc
doins src/.gdbinit
for t in basic w32 gtk lucid
do
dosym set-emacs-default.sh /usr/bin/set-emacs-default-${t}.sh
done
dodir /etc/postinstall
priority=0
for t in basic w32 gtk lucid
do
priority=$(( priority + 10 ))
cat > ${D}/etc/postinstall/emacs-${t}.sh <<EOF
/usr/sbin/alternatives --install /usr/bin/emacs emacs \\
/usr/bin/emacs-${t}.exe ${priority}
/usr/sbin/alternatives --install /usr/bin/emacsclient emacsclient \\
/usr/bin/emacsclient-${t}.exe ${priority}
EOF
chmod +x ${D}/etc/postinstall/emacs-${t}.sh
done
dodir /etc/preremove
for t in basic w32 gtk lucid
do
cat > ${D}/etc/preremove/emacs-${t}.sh <<EOF
/usr/sbin/update-alternatives --remove emacs /usr/bin/emacs-${t}.exe
/usr/sbin/update-alternatives --remove emacsclient /usr/bin/emacsclient-${t}.exe
EOF
chmod +x ${D}/etc/preremove/emacs-${t}.sh
done
dodir /var/lib/rebase/dynpath.d
echo "/usr/local/lib/emacs/${VERSION}/native-lisp" \
> ${D}/var/lib/rebase/dynpath.d/emacs
}
src_test() {
cd ${B}
make check
}
# SCALLYWAG="deploy notest"
SCALLYWAG="nobuild"
# SCALLYWAG="notest"
next prev parent reply other threads:[~2022-01-01 17:26 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 17:21 bug#52376: 28.0.90; libdir is missing from native-comp-eln-load-path with GTK3 build Bhavin Gandhi
2021-12-08 17:33 ` Eli Zaretskii
2021-12-08 18:05 ` Bhavin Gandhi
2021-12-08 18:25 ` Eli Zaretskii
2021-12-08 19:19 ` Bhavin Gandhi
2021-12-08 20:11 ` Eli Zaretskii
2021-12-08 20:31 ` Bhavin Gandhi
2021-12-09 11:06 ` Andrea Corallo
2021-12-09 17:09 ` Bhavin Gandhi
2021-12-09 17:23 ` Andrea Corallo
2021-12-09 18:29 ` Bhavin Gandhi
2021-12-09 20:14 ` Andrea Corallo
2021-12-09 20:18 ` Andrea Corallo
2021-12-10 9:25 ` Bhavin Gandhi
2021-12-10 9:45 ` Andrea Corallo
2021-12-10 10:00 ` Bhavin Gandhi
2021-12-10 11:36 ` Eli Zaretskii
2021-12-10 11:51 ` Bhavin Gandhi
2021-12-10 12:20 ` Eli Zaretskii
2021-12-10 14:38 ` Bhavin Gandhi
2021-12-10 14:50 ` Eli Zaretskii
2021-12-10 15:08 ` Eli Zaretskii
2021-12-10 15:47 ` Bhavin Gandhi
2021-12-10 16:56 ` Eli Zaretskii
2021-12-10 19:53 ` Ken Brown
2021-12-11 12:49 ` Eli Zaretskii
2022-01-01 17:12 ` Bhavin Gandhi
2022-01-01 17:26 ` Ken Brown [this message]
2022-01-02 17:33 ` Bhavin Gandhi
2022-01-01 17:27 ` Eli Zaretskii
2022-01-01 19:04 ` Bhavin Gandhi
2022-01-01 19:19 ` Eli Zaretskii
2022-01-02 17:39 ` Bhavin Gandhi
2022-01-02 18:22 ` Eli Zaretskii
2022-01-04 18:17 ` Bhavin Gandhi
2022-01-04 20:07 ` Eli Zaretskii
2021-12-10 11:32 ` Eli Zaretskii
2021-12-09 18:39 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f09d3d09-83fd-2692-1f30-579d36b64862@cornell.edu \
--to=kbrown@cornell.edu \
--cc=52376@debbugs.gnu.org \
--cc=akrl@sdf.org \
--cc=bhavin7392@gmail.com \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.