Testing upstream2 branch

25 views
Skip to first unread message

Ana Huamán

unread,
Dec 12, 2014, 7:19:41 AM12/12/14
to ach-...@googlegroups.com

I attempted to install https://github.com/KimBP/ach (branch upstream2) and got the following error:

src/achtool.c:308:9: warning: enum conversion in assignment is invalid in C++ [-Wc++-compat]
src/achtool.c: In function ‘cmd_file’:
src/achtool.c:346:24: error: expected ‘)’ before ‘ACH_CHAN_NAME_PREFIX’
make[2]: *** [achtool.o] Error 1

A quick grep search tells me that ACH_CHAN_NAME_PREFIX is not defined:

ana@calvin:~/Software/LWA4/
kim/ach$ grep -r  "ACH_CHAN_NAME_PREFIX" .
./src/achtool.c:    printf("/dev/shm/" ACH_CHAN_NAME_PREFIX "%s\n", opt_chan_name );


Comparing with the ach version of master, where ACH_CHAN_NAME_PREFIX is defined in ach_impl.h :

ana@calvin:~/Software/LWA4/
ach$ grep -r  "ACH_CHAN_NAME_PREFIX" .
./include/ach_impl.h:#define ACH_CHAN_NAME_PREFIX "/achshm-"
./src/achtool.c:    printf("/dev/shm/" ACH_CHAN_NAME_PREFIX "%s\n", opt_chan_name );
./src/ach.c:    strcpy( buf, ACH_CHAN_NAME_PREFIX );


So, I could not test since I could not finish compiling.

Ana

Neil Dantam

unread,
Jan 4, 2015, 8:31:55 PM1/4/15
to ach-...@googlegroups.com
On 12/12/2014 06:19 AM, Ana Huamán wrote:>
> I attempted to install https://github.com/KimBP/ach (branch upstream2)
> and got the following error:

*SNIP*

The "kernel" branch at https://github.com/golems/ach has updated
build scripts to automagically compile and install the kernel module
from the top-level makefile. (I also fixed the small error Ana
found and added support for kernel channel creation from the shell).

Kernel channels work for me under at least trivial testing.

Still TODO:
* More extensive testing
* Refactor/reduce copy-pasted code between userspace and kernelspace
* Create DKMS packaging to autobuild the kernel module on debian
derivatives

A big thank you to Kim and Prevas for the work!

Cheers,
-ntd

mat...@gmail.com

unread,
Jan 5, 2015, 10:08:39 AM1/5/15
to ach-...@googlegroups.com
Hi!

autoreconf -i fails on kernel branch (works fine on master):
> cd ach/
> git checkout kernel
> autoreconf -i
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
configure.ac:12: installing './compile'
configure.ac:16: installing './config.guess'
configure.ac:16: installing './config.sub'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
configure.ac:362: error: required file 'module/Makefile.in' not found
configure.ac:362: error: required file 'module/Kbuild.in' not found
Makefile.am:98: warning: source file 'python/ach_py.c' is in a subdirectory,
Makefile.am:98: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled.  For now, the corresponding output
automake: object file(s) will be placed in the top-level directory.  However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
/usr/share/automake-1.14/am/ltlibrary.am: warning: 'ach_py.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.14/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
Makefile.am:97:   while processing Libtool library 'ach_py.la'
Makefile.am:28: warning: source file 'src/ach_posix.c' is in a subdirectory,
Makefile.am:28: but option 'subdir-objects' is disabled
Makefile.am:28: warning: source file 'src/pipe.c' is in a subdirectory,
Makefile.am:28: but option 'subdir-objects' is disabled
Makefile.am:28: warning: source file 'src/dns.c' is in a subdirectory,
Makefile.am:28: but option 'subdir-objects' is disabled
/usr/share/automake-1.14/am/ltlibrary.am: warning: 'libach.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.14/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
Makefile.am:20:   while processing Libtool library 'libach.la'
Makefile.am:83: warning: source file 'cpp/achcpp.cpp' is in a subdirectory,
Makefile.am:83: but option 'subdir-objects' is disabled
/usr/share/automake-1.14/am/ltlibrary.am: warning: 'libachcpp.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.14/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
Makefile.am:20:   while processing Libtool library 'libachcpp.la'
Makefile.am:145: warning: source file 'java/achj.c' is in a subdirectory,
Makefile.am:145: but option 'subdir-objects' is disabled
/usr/share/automake-1.14/am/ltlibrary.am: warning: 'libachj.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.14/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
Makefile.am:143:   while processing Libtool library 'libachj.la'
Makefile.am:23: warning: source file 'src/achutil.c' is in a subdirectory,
Makefile.am:23: but option 'subdir-objects' is disabled
/usr/share/automake-1.14/am/ltlibrary.am: warning: 'libachutil.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.14/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
Makefile.am:22:   while processing Libtool library 'libachutil.la'
Makefile.am:36: warning: source file 'src/achtool.c' is in a subdirectory,
Makefile.am:36: but option 'subdir-objects' is disabled
Makefile.am:73: warning: source file 'src/ach-example.c' is in a subdirectory,
Makefile.am:73: but option 'subdir-objects' is disabled
Makefile.am:76: warning: source file 'src/ach-bench.c' is in a subdirectory,
Makefile.am:76: but option 'subdir-objects' is disabled
Makefile.am:64: warning: source file 'src/achcat.c' is in a subdirectory,
Makefile.am:64: but option 'subdir-objects' is disabled
Makefile.am:40: warning: source file 'src/achcop.c' is in a subdirectory,
Makefile.am:40: but option 'subdir-objects' is disabled
Makefile.am:67: warning: source file 'src/achd/achd.c' is in a subdirectory,
Makefile.am:67: but option 'subdir-objects' is disabled
Makefile.am:67: warning: source file 'src/achd/client.c' is in a subdirectory,
Makefile.am:67: but option 'subdir-objects' is disabled
Makefile.am:67: warning: source file 'src/achd/io.c' is in a subdirectory,
Makefile.am:67: but option 'subdir-objects' is disabled
Makefile.am:67: warning: source file 'src/achd/transport.c' is in a subdirectory,
Makefile.am:67: but option 'subdir-objects' is disabled
Makefile.am:45: warning: source file 'src/achlog.c' is in a subdirectory,
Makefile.am:45: but option 'subdir-objects' is disabled
Makefile.am:48: warning: source file 'src/test/achtest.c' is in a subdirectory,
Makefile.am:48: but option 'subdir-objects' is disabled
Makefile.am:53: warning: source file 'src/test/canceltest.c' is in a subdirectory,
Makefile.am:53: but option 'subdir-objects' is disabled
Makefile.am:89: warning: source file 'cpp/cpptest.cpp' is in a subdirectory,
Makefile.am:89: but option 'subdir-objects' is disabled
Makefile.am:61: warning: source file 'src/test/robusttest.c' is in a subdirectory,
Makefile.am:61: but option 'subdir-objects' is disabled
Makefile.am:58: warning: source file 'src/test/transfertest.c' is in a subdirectory,
Makefile.am:58: but option 'subdir-objects' is disabled
Makefile.am: installing './depcomp'
Makefile.am:96: installing './py-compile'
Makefile.am:160: error: required directory ./module does not exist
parallel-tests: installing './test-driver'
autoreconf: automake failed with exit status: 1

Regards,
Mattias

Neil Dantam

unread,
Jan 5, 2015, 12:23:06 PM1/5/15
to ach-...@googlegroups.com
On 01/05/2015 09:08 AM, mat...@gmail.com wrote:
> autoreconf -i fails on kernel branch (works fine on master):

Mea culpa. Please `git pull` now.

Cheers,
-ntd

mat...@gmail.com

unread,
Jan 7, 2015, 3:59:30 AM1/7/15
to ach-...@googlegroups.com
Hi!

Now it works on my Ubuntu, thanks!

But... I does not work when I tried to incorporate it in our embedded disto using Yocto. It seems like there is an error in configuring using cross compilation. See line 178 of attached file.

Regards,
Mattias
log.do_configure

Neil Dantam

unread,
Jan 7, 2015, 4:51:40 AM1/7/15
to ach-...@googlegroups.com

On 01/07/2015 02:59 AM, mat...@gmail.com wrote:
> But... I does not work when I tried to incorporate it in our embedded
> disto using Yocto. It seems like there is an error in configuring using
> cross compilation. See line 178 of attached file.

Hmm, looks like autoconf's AC_CHECK_FILE macro doesn't work when
cross-compiling (which is the only time when we need to check for
those files!). Please apply the attached patch, `autoreconf &&
./configure`, and see if that does it.

Also, if you want to cross-compile the module via Kbuild, you may
need to specify KDIR and KERNELRELEASE for ./configure. Suggestions
to configure this automatically would be welcome (i.e., where are
kernel headers and where do built modules go when cross compiling?).

Cheers,
-ntd
ach_ach_check_file.patch

mat...@gmail.com

unread,
Jan 8, 2015, 8:56:16 AM1/8/15
to ach-...@googlegroups.com
Hi!

Using this patch and setting the KDIR and KERNELRELEASE does work for me! Thanks.
Will this be pushed to the kernel branch?

Regards,
Mattias

Neil T. Dantam

unread,
Jan 8, 2015, 4:18:00 PM1/8/15
to ach-...@googlegroups.com

> Using this patch and setting the KDIR and KERNELRELEASE does work
> for me!

Cool, please let us know how the kernel channels work for you.

> Will this be pushed to the kernel branch?

Yes, the patch is now applied to the latest master and kernel branches
at github.com:golems/ach.

Cheers,
-ntd

mat...@gmail.com

unread,
Jan 9, 2015, 3:35:08 AM1/9/15
to ach-...@googlegroups.com
Hi!

Thanks a lot!

But I now have issues building the userspace library on the embedded distro. See attached log file.
We don't have java (jni) on the embedded distro, and I can't find a configure switch to exclude the java stuff.
My work-around now is to use make to build the required targets explicitly.

Regards,
Mattias
log.do_compile

Neil Dantam

unread,
Jan 9, 2015, 4:21:41 AM1/9/15
to ach-...@googlegroups.com

On 01/09/2015 02:35 AM, mat...@gmail.com wrote:
> But I now have issues building the userspace library on the embedded
> distro. See attached log file.
> We don't have java (jni) on the embedded distro, and I can't find a
> configure switch to exclude the java stuff.
> My work-around now is to use make to build the required targets explicitly.

Please try the attached patch which will (1) only automatically
build java support if jni.h is found and (2) add an
--enable-java=yes|no option to ./configure to forcibly
enable/disable java support.

Cheers,
-ntd

ach_config_java.patch

mat...@gmail.com

unread,
Jan 9, 2015, 7:19:01 AM1/9/15
to ach-...@googlegroups.com
Hi!

Your patch solves the jni-problem, but now I stumbled on to the next one. It seems like I can't build the docs, and I can find a configure-switch to skip it. See attached file.

Regards,
Mattias
log.do_compile

Neil Dantam

unread,
Jan 9, 2015, 12:14:12 PM1/9/15
to ach-...@googlegroups.com
On 01/09/2015 06:19 AM, mat...@gmail.com wrote:
> Your patch solves the jni-problem, but now I stumbled on to the next
> one. It seems like I can't build the docs, and I can find a
> configure-switch to skip it. See attached file.

From the INSTALL file:

> Cross Compilation Notes
> -----------------------
> Try cross-compiling from the distribution tarball rather than a clean
> git checkout. This is because part of the build runs the built
> executables to generate the unix man pages, and cross-compiled
> binaries are of course not runnable on the build machine. The
> distribution tarball already includes the man pages, so they will not
> need to be rebuilt. You can build the tarball yourself with `make &&
> make dist`. Alternatively, running `./configure && make && make
> clean` will build the manpages and clean out the binaries. Then, you
> can re- `./configure ...` for your cross-compile setup.

(you can get a distribution tarball with `./configure && make && make
doc/.javadoc.stamp && make dist`)

Does that do it for you?

Cheers,
-ntd

Neil T. Dantam

unread,
Jan 9, 2015, 6:28:17 PM1/9/15
to ach-...@googlegroups.com

On 01/09/2015 11:14 AM, Neil Dantam wrote:
> On 01/09/2015 06:19 AM, mat...@gmail.com wrote:
>> It seems like I can't build the docs, and I can find a
>> configure-switch to skip it. See attached file.
>
> From the INSTALL file:
> *SNIP*

Ok, I don't think I answer actually addressed your problem.

The latest git sources add configure options to disable documentation
generation and won't try running built binaries for help2man when
cross-compiling.

Cheers,
-ntd

mat...@gmail.com

unread,
Jan 12, 2015, 3:07:45 AM1/12/15
to ach-...@googlegroups.com
Hi!
Thanks a lot, now it builds!
Regards,
Mattias
Reply all
Reply to author
Forward
0 new messages