unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Building emacs using the `spksrc` toolchain results in `./temacs: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory`
@ 2018-08-15  0:44 Tim Visher
  2018-08-15  1:05 ` Noam Postavsky
  0 siblings, 1 reply; 6+ messages in thread
From: Tim Visher @ 2018-08-15  0:44 UTC (permalink / raw)
  To: emacs

I'm attempting to provide an emacs package for Synology NASes using the
`spksrc` toolchain (PR: https://github.com/SynoCommunity/spksrc/pull/3352).

The build fails with the following error message:

```
./temacs --batch  --load loadup bootstrap
./temacs: error while loading shared libraries: libncurses.so.6: cannot
open shared object file: No such file or directory
```

`./configure` succeeds after being called like:

```
cd /home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/emacs-26.1 \
    && env
PKG_CONFIG_LIBDIR=/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/install//var/packages/emacs/target/lib/pkgconfig
\
           WORK_DIR=/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1 \
           INSTALL_PREFIX=/var/packages/emacs/target \
           TC=syno-apollolake-6.1 \

 LD="/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld"
\

 LDSHARED="/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-gcc
-shared" \

 CPP="/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-cpp"
\

 NM="/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-nm"
\

 CC="/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-gcc"
\

 AS="/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-as"
\

 RANLIB="/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ranlib"
\

 CXX="/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-g++"
\

 AR="/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ar"
\

 STRIP="/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-strip"
\

 OBJDUMP="/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-objdump"
\

 READELF="/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-readelf"
\

 CFLAGS="-I/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/include
-I/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/install//var/packages/emacs/target/include
" \

 CPPFLAGS="-I/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/include
-I/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/install//var/packages/emacs/target/include
" \

 CXXFLAGS="-I/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/include
-I/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/install//var/packages/emacs/target/include
" \

 LDFLAGS="-L/home/vagrant/spksrc/toolchains/syno-apollolake-6.1/work/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/libftu
-L/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/install//var/packages/emacs/target/lib
-Wl,--rpath-link,/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/install//var/packages/emacs/target/lib
-Wl,--rpath,/var/packages/emacs/target/lib " \
           ./configure \
           --host=x86_64-pc-linux-gnu \
           --build=i686-pc-linux \
           --prefix=/var/packages/emacs/target \
           --without-x \
           --with-gnutls
```

```
vagrant@debian-8:~/spksrc/spk/emacs/work-apollolake-6.1/emacs-26.1$ bash x
| grep -F ncurses
checking for library containing tputs... -lncurses
```

Notably LDFLAGS appears to contain a directory which contains
libncurses.so.6

```
vagrant@debian-8:~/spksrc/spk/emacs/work-apollolake-6.1/emacs-26.1$ ls -l
/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/install//var/packages/emacs/target/lib/libncurses.so*
lrwxrwxrwx 1 vagrant vagrant     15 Aug 14 23:13
/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/install//var/packages/emacs/target/lib/libncurses.so
-> libncurses.so.6
lrwxrwxrwx 1 vagrant vagrant     17 Aug 14 23:13
/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/install//var/packages/emacs/target/lib/libncurses.so.6
-> libncurses.so.6.1
-rwxr-xr-x 1 vagrant vagrant 462808 Aug 14 23:13
/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/install//var/packages/emacs/target/lib/libncurses.so.6.1
```

I'm unsure what else to collect but I'm happy to provide more logs.

A full log of the build is available here:
https://gist.githubusercontent.com/timvisher/bc2855136b3f9933599d1368c5892325/raw/8561dc1e94594f81822fa625f7e754f8e4b31fb6/emacs-arch-apollolake-full.log
(it's quite large).

`spksrc` is automatically compiling ncurses but appears, to my eyes, to be
telling emacs where to find it.

Thanks in advance!

--

In Christ,

Timmy V.

https://blog.twonegatives.com
https://five.sentenc.es


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Building emacs using the `spksrc` toolchain results in `./temacs: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory`
  2018-08-15  0:44 Building emacs using the `spksrc` toolchain results in `./temacs: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory` Tim Visher
@ 2018-08-15  1:05 ` Noam Postavsky
  2018-08-15 12:46   ` Tim Visher
  0 siblings, 1 reply; 6+ messages in thread
From: Noam Postavsky @ 2018-08-15  1:05 UTC (permalink / raw)
  To: Tim Visher; +Cc: emacs

On 14 August 2018 at 20:44, Tim Visher <tim.visher@gmail.com> wrote:
> I'm attempting to provide an emacs package for Synology NASes using the
> `spksrc` toolchain (PR: https://github.com/SynoCommunity/spksrc/pull/3352).

This is described as a "Cross compilation framework", I'm not sure if
this will work (see Bug#9192)

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9192

> The build fails with the following error message:
>
> ```
> ./temacs --batch  --load loadup bootstrap
> ./temacs: error while loading shared libraries: libncurses.so.6: cannot
> open shared object file: No such file or directory

> Notably LDFLAGS appears to contain a directory which contains
> libncurses.so.6
>
> ```
> vagrant@debian-8:~/spksrc/spk/emacs/work-apollolake-6.1/emacs-26.1$ ls -l

> /home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/install//var/packages/emacs/target/lib/libncurses.so.6.1

Does your libncurses only operate on the target? Because the Emacs
build system needs to run Emacs on your build machine (hence the
difficulty with cross-compilation).



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Building emacs using the `spksrc` toolchain results in `./temacs: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory`
  2018-08-15  1:05 ` Noam Postavsky
@ 2018-08-15 12:46   ` Tim Visher
  2018-08-15 13:53     ` Noam Postavsky
  0 siblings, 1 reply; 6+ messages in thread
From: Tim Visher @ 2018-08-15 12:46 UTC (permalink / raw)
  To: npostavs; +Cc: emacs

Thanks for your response, Noam.

On Tue, Aug 14, 2018 at 9:05 PM Noam Postavsky <npostavs@gmail.com> wrote:

> On 14 August 2018 at 20:44, Tim Visher <tim.visher@gmail.com> wrote:
> > I'm attempting to provide an emacs package for Synology NASes using the
> > `spksrc` toolchain (PR:
> https://github.com/SynoCommunity/spksrc/pull/3352).
>
> This is described as a "Cross compilation framework", I'm not sure if
> this will work (see Bug#9192)
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9192


I've pointed the maintainers of spksrc to that page to see if they have any
insight related to their framework specifically.


> > The build fails with the following error message:
> >
> > ```
> > ./temacs --batch  --load loadup bootstrap
> > ./temacs: error while loading shared libraries: libncurses.so.6: cannot
> > open shared object file: No such file or directory
>
> > Notably LDFLAGS appears to contain a directory which contains
> > libncurses.so.6
> >
> > ```
> > vagrant@debian-8:~/spksrc/spk/emacs/work-apollolake-6.1/emacs-26.1$ ls
> -l
>
> >
> /home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/install//var/packages/emacs/target/lib/libncurses.so.6.1
>
> Does your libncurses only operate on the target? Because the Emacs
> build system needs to run Emacs on your build machine (hence the
> difficulty with cross-compilation).
>

"Does your libncurses only operate on the target?" I'm unsure what to even
Google for to answer this question intelligently. Can you give me some
pointers?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Building emacs using the `spksrc` toolchain results in `./temacs: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory`
  2018-08-15 12:46   ` Tim Visher
@ 2018-08-15 13:53     ` Noam Postavsky
  2018-08-18 15:15       ` Tim Visher
  2018-08-21 12:09       ` Tim Visher
  0 siblings, 2 replies; 6+ messages in thread
From: Noam Postavsky @ 2018-08-15 13:53 UTC (permalink / raw)
  To: Tim Visher; +Cc: emacs

On 15 August 2018 at 08:46, Tim Visher <tim.visher@gmail.com> wrote:

> "Does your libncurses only operate on the target?" I'm unsure what to even
> Google for to answer this question intelligently. Can you give me some
> pointers?

Sorry, that didn't come out clearly. What I mean is, how far apart are
your build and target machines (with respect to CPU and OS)? Can you
execute a binary built for the target on your build machine (that's
what the Emacs build system does)?

If you can, then it might just be a matter of putting the spksrc
libncurses directory in LD_LIBRARY_PATH (LDFLAGS only tells the linker
where to look, it doesn't affect the runtime).



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Building emacs using the `spksrc` toolchain results in `./temacs: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory`
  2018-08-15 13:53     ` Noam Postavsky
@ 2018-08-18 15:15       ` Tim Visher
  2018-08-21 12:09       ` Tim Visher
  1 sibling, 0 replies; 6+ messages in thread
From: Tim Visher @ 2018-08-18 15:15 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: emacs

On Wed, Aug 15, 2018 at 9:53 AM Noam Postavsky <npostavs@gmail.com> wrote:

> On 15 August 2018 at 08:46, Tim Visher <tim.visher@gmail.com> wrote:
>
> > "Does your libncurses only operate on the target?" I'm unsure what to
> even
> > Google for to answer this question intelligently. Can you give me some
> > pointers?
>
> Sorry, that didn't come out clearly. What I mean is, how far apart are
> your build and target machines (with respect to CPU and OS)? Can you
> execute a binary built for the target on your build machine (that's
> what the Emacs build system does)?
>
> If you can, then it might just be a matter of putting the spksrc
> libncurses directory in LD_LIBRARY_PATH (LDFLAGS only tells the linker
> where to look, it doesn't affect the runtime).
>

Ah I get it then. :)

I'm not sure whether I can or not but I can certainly try and will do so
soon. Thanks so much for your input!


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Building emacs using the `spksrc` toolchain results in `./temacs: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory`
  2018-08-15 13:53     ` Noam Postavsky
  2018-08-18 15:15       ` Tim Visher
@ 2018-08-21 12:09       ` Tim Visher
  1 sibling, 0 replies; 6+ messages in thread
From: Tim Visher @ 2018-08-21 12:09 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: emacs

On Wed, Aug 15, 2018 at 9:53 AM Noam Postavsky <npostavs@gmail.com> wrote:

> On 15 August 2018 at 08:46, Tim Visher <tim.visher@gmail.com> wrote:
>
> > "Does your libncurses only operate on the target?" I'm unsure what to
> even
> > Google for to answer this question intelligently. Can you give me some
> > pointers?
>
> If you can, then it might just be a matter of putting the spksrc
> libncurses directory in LD_LIBRARY_PATH (LDFLAGS only tells the linker
> where to look, it doesn't affect the runtime).
>

Success! (At least as far as the temacs step error is concerned. :) )

```
vagrant@debian-8:~/spksrc/spk/emacs/work-apollolake-6.1/emacs-26.1/src$
LD_LIBRARY_PATH=../../install/var/packages/emacs/target/lib/ ./temacs
--batch --load loadup
bootstrap
Loading loadup.el (source)...
Using load-path
(/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/emacs-26.1/lisp
/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/emacs-26.1/lisp/emacs-lisp
/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/emacs-26.1/lisp/progmodes
/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/emacs-26.1/lisp/language
/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/emacs-26.1/lisp/international
/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/emacs-26.1/lisp/textmodes
/home/vagrant/spksrc/spk/emacs/work-apollolake-6.1/emacs-26.1/lisp/vc)
Loading emacs-lisp/byte-run...
…
Finding pointers to doc strings...done
Dumping under the name emacs
87479 pure bytes used
```


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-21 12:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-15  0:44 Building emacs using the `spksrc` toolchain results in `./temacs: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory` Tim Visher
2018-08-15  1:05 ` Noam Postavsky
2018-08-15 12:46   ` Tim Visher
2018-08-15 13:53     ` Noam Postavsky
2018-08-18 15:15       ` Tim Visher
2018-08-21 12:09       ` Tim Visher

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).