Discussion:
[UrJTAG-dev] autogen.sh fails on macOS
Tomasz CEDRO
2017-03-01 12:24:45 UTC
Permalink
Hey :-)

I am trying to build HEAD from repo, as there are new drivers added
since last 0.10 release. I have this problem at autogen.sh stage on
macOS. There is no problem on FreeBSD. I have seen on sf that problem
was noticed before by Xiafoan, but no solution was provided to the
source tree. We should fix this one. Any hints appreciated :-)

Best regards,
Tomek


iCeDeROM:urjtag cederom$ ./autogen.sh
autoreconf: Entering directory `.'
autoreconf: running: /opt/local/bin/autopoint --force
autoreconf: running: /opt/local/bin/aclocal --force -I m4
Use of uninitialized value $msg in concatenation (.) or string at
/opt/local/bin/autom4te line 1026.
Use of uninitialized value $stacktrace in pattern match (m//) at
/opt/local/bin/autom4te line 1026.
unknown channel m4trace: -1- AS_VAR_APPEND(ac_configure_args, " '$ac_arg'")
at /opt/local/share/autoconf/Autom4te/Channels.pm line 638.
Autom4te::Channels::msg('m4trace: -1-
AS_VAR_APPEND(ac_configure_args, " \'$ac_arg\'")\x{a}', undef,
'warning: ', 'partial', 0) called at /opt/local/bin/autom4te line 1026
aclocal: error: echo failed with exit status: 1
autoreconf: /opt/local/bin/aclocal failed with exit status: 1

autoreconf failed.

iCeDeROM:urjtag cederom$ uname -a
Darwin iCeDeROM.local 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22
22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Benjamin Henrion
2017-03-01 12:42:32 UTC
Permalink
Post by Tomasz CEDRO
Hey :-)
I am trying to build HEAD from repo, as there are new drivers added
since last 0.10 release. I have this problem at autogen.sh stage on
macOS. There is no problem on FreeBSD. I have seen on sf that problem
was noticed before by Xiafoan, but no solution was provided to the
source tree. We should fix this one. Any hints appreciated :-)
Get some travis-ci in place? They have OSX slaves...
--
Benjamin Henrion <bhenrion at ffii.org>
FFII Brussels - +32-484-566109 - +32-2-3500762
"In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators."
Tomasz CEDRO
2017-03-01 12:52:16 UTC
Permalink
I can see that libsodium had the same build break problem with
autoconf-2.69 and the compatibility patch for 2.63 was reverted. This
is the problem here as well. We could revert this change and verify if
crosscompilation still works.
https://github.com/jedisct1/libsodium/pull/216

In UrJTAG I got rid of this problem by removing following lines from
acinclude.m4:

152 dnl AS_VAR_APPEND
153 dnl -------------
154 dnl
155 dnl this was added in autoconf-2.64+
156 dnl
157 m4_ifndef([AS_VAR_APPEND],[dnl
158 AC_DEFUN([AS_VAR_APPEND], [$1=$$1$2])
159 ])dnl

iCeDeROM:urjtag cederom$ autoconf --version
autoconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

iCeDeROM:urjtag cederom$ uname -a
Darwin iCeDeROM.local 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22
22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64

iCeDeROM:urjtag cederom$ port -v
MacPorts 2.4.1
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Tomasz CEDRO
2017-03-01 13:02:40 UTC
Permalink
Here is my github local fork just in case:
https://github.com/cederom/UrJTAG/tree/CeDeROM

Tanks for travis-ci hint Benjamin! :-)
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Xiaofan Chen
2017-03-01 14:08:35 UTC
Permalink
Post by Tomasz CEDRO
https://github.com/cederom/UrJTAG/tree/CeDeROM
I have not built urjtag since that Mac OS X build question
raised in the urjtag mailing list back in 2013.

I just tried to build urjtag again and I had the same problem with you
under macOS. Your workaround helps to autogen to work. Thanks.

BTW, I am not using macport but Homebrew. I need to use Homebrew
gettext (keg only) in order to have autopoint under Homebrew.

Still I can not build urjtag using Homebrew in the end due to YACC problem.

MyMacMini:urjtag xiaofanc$ ./autogen.sh --without-readline
--prefix=/usr/local/Cellar/urjtag/HEAD
...
urjtag is now configured for
Libraries:
libusb : 1.0
libftdi : yes (have async mode)
libftd2xx : no
inpout32 : no

Subsystems:
SVF : yes
BSDL : yes
STAPL : no

Drivers:
Bus : arm9tdmi au1500 avr32 bcm1250 blackfin bscoach ejtag
ejtag_dma fjmem ixp425 ixp435 ixp465 jopcyc h7202 lh7a400 mpc5200
mpc824x mpc8313 mpc837x ppc405ep ppc440gx_ebc8 prototype pxa2x0 pxa27x
s3c4510 sa1110 sh7727 sh7750r sh7751r sharc_21065L sharc_21369_ezkit
slsup3 tx4925 zefant_xs3
Cable : arcom byteblaster dlc5 ea253 ei012 ft2232 gpio ice100
igloo jlink keithkoep lattice mpcbdm triton usbblaster vsllink wiggler
xpc
Lowlevel : ftdi

Language bindings:
python : yes

MyMacMini:urjtag xiaofanc$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
...
...
Making all in global
CC parse.lo
CC log-error.lo
CC data_dir.lo
CC params.lo
params.c:246:14: warning: comparison of constant -1 with expression of type
'urj_param_type_t' (aka 'enum URJ_PARAM_TYPE_T') is always false
[-Wtautological-constant-out-of-range-compare]
if (type == -1)
~~~~ ^ ~~
1 warning generated.
CCLD libglobal.la
Making all in svf
YACC svf_bison.c
/Users/xiaofanc/work/urjtag/urjtag-git/urjtag/src/svf/svf_bison.y:32.14-23:
syntax error, unexpected string, expecting =
make[3]: *** [svf_bison.c] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Using Homebrew bison (keg only) fixed the above issue.


MyMacMini:urjtag xiaofanc$ yacc --version
bison (GNU Bison) 2.3
Written by Robert Corbett and Richard Stallman.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

MyMacMini:urjtag xiaofanc$ export PATH="/usr/local/opt/bison/bin:$PATH"

MyMacMini:urjtag xiaofanc$ yacc --version
bison (GNU Bison) 3.0.4
Written by Robert Corbett and Richard Stallman.
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

MyMacMini:urjtag xiaofanc$ make

MyMacMini:urjtag xiaofanc$ make install

MyMacMini:urjtag xiaofanc$ brew link urjtag

MyMacMini:urjtag xiaofanc$ which jtag
/usr/local/bin/jtag
--
Xiaofan
Tomasz CEDRO
2017-03-01 15:07:25 UTC
Permalink
Hey Xiafan!! Long time no see!!! =)

I have swiched to MacBookPro two years ago, its amazing! BSD that works! =)

Still I am using FreeBSD on servers and PC boxes :-)

Glad the Autogen fix works!

With the current configure I have READLINE related problem - macOS
MacPorts use system (BSD) readline includes first rather than MacPorts
(GNU) and build breaks, but this is reasy to fix providing configure
parameters..

Your build problem seem correct out of range error detection, as there
is no -1 value in this enum, and probably enum starts with 0. Will try
to simulare this problem here and report back :-)

Tomek
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Tomasz CEDRO
2017-03-01 15:44:01 UTC
Permalink
Post by Xiaofan Chen
Making all in global
CC parse.lo
CC log-error.lo
CC data_dir.lo
CC params.lo
params.c:246:14: warning: comparison of constant -1 with expression of type
'urj_param_type_t' (aka 'enum URJ_PARAM_TYPE_T') is always false
[-Wtautological-constant-out-of-range-compare]
if (type == -1)
~~~~ ^ ~~
1 warning generated.
There lots of warnings of this kind generated, caused by out of range
comparisons that always give false logic.. something worth cleaning up
in near future..
Post by Xiaofan Chen
CCLD libglobal.la
Making all in svf
YACC svf_bison.c
syntax error, unexpected string, expecting =
make[3]: *** [svf_bison.c] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Have you tried disabling the SVF player with ./configure --disable-svf ?
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Tomasz CEDRO
2017-03-01 16:07:22 UTC
Permalink
Autoconf-2.69 problem was fixed by below acinclude.m4 modification.
Tested on macOS10.12.3/MacPorts and FreeBSD 11.0-RELEASE. Patch
attached, please verify :-)

diff --git a/urjtag/acinclude.m4 b/urjtag/acinclude.m4
index 59fcc23..2628764 100644
--- a/urjtag/acinclude.m4
+++ b/urjtag/acinclude.m4
@@ -149,16 +149,6 @@ AC_DEFUN([AS_VAR_PREPEND], [$1=$2${$1}])
])dnl


-dnl AS_VAR_APPEND
-dnl -------------
-dnl
-dnl this was added in autoconf-2.64+
-dnl
-m4_ifndef([AS_VAR_APPEND],[dnl
-AC_DEFUN([AS_VAR_APPEND], [$1=${$1}$2])
-])dnl
-
-
dnl m4_ifnblank
dnl -----------
dnl
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Geert Stappers
2017-03-08 21:02:09 UTC
Permalink
Post by Tomasz CEDRO
--- a/urjtag/acinclude.m4
+++ b/urjtag/acinclude.m4
@@ -149,16 +149,6 @@ AC_DEFUN([AS_VAR_PREPEND], [$1=$2${$1}])
])dnl
-dnl AS_VAR_APPEND
-dnl -------------
-dnl
-dnl this was added in autoconf-2.64+
-dnl
-m4_ifndef([AS_VAR_APPEND],[dnl
-AC_DEFUN([AS_VAR_APPEND], [$1=${$1}$2])
-])dnl
-
-
dnl m4_ifnblank
dnl -----------
dnl
The "attachment version" of that patch applied cleanly.



Groeten
Geert Stappers
--
Leven en laten leven
Tomasz CEDRO
2017-03-08 21:23:34 UTC
Permalink
Post by Geert Stappers
The "attachment version" of that patch applied cleanly.
TANK U SIR =)
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Geert Stappers
2017-03-12 16:03:20 UTC
Permalink
Post by Tomasz CEDRO
Post by Geert Stappers
The "attachment version" of that patch applied cleanly.
} } The "attachment version" of that patch applied cleanly to my local repository
Post by Tomasz CEDRO
TANK U SIR =)
Thanks for providing the patch.

It has tested on my Linux system.
And it passed the test.

It is now in the SF git repository.


Groeten
Geert Stappers
--
Leven en laten leven
Loading...