mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] additional c file in a src-autoconf-proglib package
@ 2013-11-11 12:32 Pat Murray
  2013-11-11 13:05 ` Jürgen Beisert
  0 siblings, 1 reply; 3+ messages in thread
From: Pat Murray @ 2013-11-11 12:32 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 700 bytes --]

Hi,

I created a package using "ptxdist test src-autoconf-proglib" , this allowed me
to create a shared library libtest.so and a binary test. That's all ok, it created
two files libtest.c and test.c and I build it successfully.

I then wanted to add another file uart.c , so that it would be built & linked with the Binary "test".

I tried the following changes to Makefile.am (highlighted in green), but it fails to build.

#
# library
#
Libtest_la_SOURCES = \
        libtest.c


#
# binary
#
test_SOURCES = \
        test.c uart.c \

How can a ptxdist package using src-autoconf-proglib have two .c files for the
Binary ( not the shared library .so)

Regards
Pat




[-- Attachment #1.2: Type: text/html, Size: 1646 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] additional c file in a src-autoconf-proglib package
  2013-11-11 12:32 [ptxdist] additional c file in a src-autoconf-proglib package Pat Murray
@ 2013-11-11 13:05 ` Jürgen Beisert
       [not found]   ` <4ECD7F7A0B03E64BA50DA3C6FC2464FD075B1FC4@KRUSTY.ddisplay.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Jürgen Beisert @ 2013-11-11 13:05 UTC (permalink / raw)
  To: ptxdist; +Cc: Pat Murray

Hi Pat,

On Monday 11 November 2013 13:32:12 Pat Murray wrote:
> I created a package using "ptxdist test src-autoconf-proglib" , this
> allowed me to create a shared library libtest.so and a binary test. That's
> all ok, it created two files libtest.c and test.c and I build it
> successfully.
>
> I then wanted to add another file uart.c , so that it would be built &
> linked with the Binary "test".
>
> I tried the following changes to Makefile.am (highlighted in green), but it
> fails to build.
>
> #
> # library
> #
> Libtest_la_SOURCES = \
>         libtest.c
>
>
> #
> # binary
> #
> test_SOURCES = \
>         test.c uart.c \

This is the correct way. Just by adding more *.c files to this symbol. After 
the last source file name you must not add a trailing '\'.

> How can a ptxdist package using src-autoconf-proglib have two .c files for
> the Binary ( not the shared library .so)

How does it fail? Can you show us the error messages?

Regards,
Juergen

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] additional c file in a src-autoconf-proglib package
       [not found]   ` <4ECD7F7A0B03E64BA50DA3C6FC2464FD075B1FC4@KRUSTY.ddisplay.com>
@ 2013-11-11 15:35     ` Jürgen Beisert
  0 siblings, 0 replies; 3+ messages in thread
From: Jürgen Beisert @ 2013-11-11 15:35 UTC (permalink / raw)
  To: ptxdist; +Cc: Pat Murray

Hi Pat,

please keep the mailing list at least on CC.

On Monday 11 November 2013 15:27:46 Pat Murray wrote:
> I changed BSP version today and I am getting the following
> Error at the prepare stage ( the get and extract worked ok)
> When I try and build a newly created package using
> "Ptxdist newpackage src-autoconf-proglib"
>
> Configure: error: cannot find install-sh, install.sh, or shtool in
> "/opt/...BSP...
>
> I haven't changed ptxdist version, I have always used
> 2012.03.0

I tried it here with a recent PTXdist version:

$ ptxdist newpackage src-autoconf-proglib
<answer the questions>
<creating a second file in local_src/mypackage-1/mysecondfile.c>
<adding the second file to the local_src/mypackage-1/Makefile.am>

$ ptxdist menuconfig
<enable the new package>

$ ptxdist go

---------------------
target: mypackage.get
---------------------

finished target mypackage.get

-------------------------
target: mypackage.extract
-------------------------

local directory instead of tar file, linking build dir
cd /home/jbe/git_repositories/OSELAS.BSP-Pengutronix-Mini2440/platform-mini2440/build-target/mypackage-1 && [ -f configure ] || sh autogen.sh

----------
autoreconf
----------

configure.ac:33: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:33: You should run autoupdate.
aclocal.m4:128: AC_PROG_LIBTOOL is expanded from...
configure.ac:33: the top level
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:33: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:33: You should run autoupdate.
aclocal.m4:128: AC_PROG_LIBTOOL is expanded from...
configure.ac:33: the top level
configure.ac:7: installing `./config.guess'
configure.ac:7: installing `./config.sub'
configure.ac:35: installing `./install-sh'
configure.ac:35: installing `./missing'
Makefile.am: installing `./depcomp'

--------
Finished
--------

patchin: no patches found
finished target mypackage.extract

------------------------------
target: mypackage.extract.post
------------------------------

patchin: fixup:
OSELAS.BSP-Pengutronix-Mini2440/platform-mini2440/build-target/mypackage-1/configure
OSELAS.BSP-Pengutronix-Mini2440/platform-mini2440/build-target/mypackage-1/ltmain.sh
patchin: fixup: done

finished target mypackage.extract.post

-------------------------
target: mypackage.prepare
-------------------------

checking build system type... x86_64-host-linux-gnu
checking host system type... arm-v4t-linux-gnueabi
checking whether to enable maintainer-specific portions of Makefiles... no
checking for arm-v4t-linux-gnueabi-gcc... arm-v4t-linux-gnueabi-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
[...]
checking whether to enable debugging... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: executing libtool commands
config.status: executing depfiles commands
finished target mypackage.prepare

-------------------------
target: mypackage.compile
-------------------------

make[1]: Entering directory `/home/jbe/git_repositories/OSELAS.BSP-Pengutronix-Mini2440/platform-mini2440/build-target/mypackage-1-build'
[...]
arm-v4t-linux-gnueabi-gcc [...] -g -O1 -MT mypackage.o -MD -MP -MF .deps/mypackage.Tpo -c -o mypackage.o [...] mypackage.c
arm-v4t-linux-gnueabi-gcc [...] -g -O1 -MT mysecondfile.o -MD -MP -MF .deps/mysecondfile.Tpo -c -o mysecondfile.o [...] mysecondfile.c
[...]
libtool: link: arm-v4t-linux-gnueabi-gcc -W -Wall -Werror -Wsign-compare -Wfloat-equal -Wformat-security -g -O1 -o mypackage mypackage.o mysecondfile.o
libtool: link: arm-v4t-linux-gnueabi-gcc -shared  -fPIC -DPIC  .libs/libmypackage.o    -O1   -Wl,-soname -Wl,libmypackage.so.0 -o .libs/libmypackage.so.0.0.0
[...]
make[1]: Leaving directory `/home/jbe/git_repositories/OSELAS.BSP-Pengutronix-Mini2440/platform-mini2440/build-target/mypackage-1-build'
finished target mypackage.compile

-------------------------
target: mypackage.install
-------------------------

make[1]: Entering directory `/home/jbe/git_repositories/OSELAS.BSP-Pengutronix-Mini2440/platform-mini2440/build-target/mypackage-1-build'
[...]
make[1]: Leaving directory `/home/jbe/git_repositories/OSELAS.BSP-Pengutronix-Mini2440/platform-mini2440/build-target/mypackage-1-build'
finished target mypackage.install

------------------------------
target: mypackage.install.pack
------------------------------

finished target mypackage.install.pack

[...]

Regards,
Juergen

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2013-11-11 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-11 12:32 [ptxdist] additional c file in a src-autoconf-proglib package Pat Murray
2013-11-11 13:05 ` Jürgen Beisert
     [not found]   ` <4ECD7F7A0B03E64BA50DA3C6FC2464FD075B1FC4@KRUSTY.ddisplay.com>
2013-11-11 15:35     ` Jürgen Beisert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox