Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chan_dongle build on OpenWrt (mips, ar71xx) fails #47

Open
GoogleCodeExporter opened this issue Apr 11, 2015 · 6 comments
Open

chan_dongle build on OpenWrt (mips, ar71xx) fails #47

GoogleCodeExporter opened this issue Apr 11, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. download the OpenWrt build toolchain
2. follow the steps to start building
3. symlink chan_dongle/contrib/openwrt/asterisk18-chan-dongle to 
openwrt/trunk/package
4. change the Makefile: WITH_ASTERISK=asterisk-1.8.7.1
5. build the entire root

What is the expected output?
an asterisk18-chan-dongle

What do you see instead?
In file included from 
/mnt/storage/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/asterisk-1.8.7
.1/include/asterisk.h:21:0,
                 from app.c:17:
/mnt/storage/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/asterisk-1.8.7
.1/include/asterisk/autoconfig.h:1046:0: warning: "PACKAGE_BUGREPORT" redefined
./config.h:98:0: note: this is the location of the previous definition
/mnt/storage/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/asterisk-1.8.7
.1/include/asterisk/autoconfig.h:1049:0: warning: "PACKAGE_NAME" redefined
./config.h:101:0: note: this is the location of the previous definition
/mnt/storage/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/asterisk-1.8.7
.1/include/asterisk/autoconfig.h:1052:0: warning: "PACKAGE_STRING" redefined
./config.h:107:0: note: this is the location of the previous definition
/mnt/storage/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/asterisk-1.8.7
.1/include/asterisk/autoconfig.h:1055:0: warning: "PACKAGE_TARNAME" redefined
./config.h:110:0: note: this is the location of the previous definition
/mnt/storage/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/asterisk-1.8.7
.1/include/asterisk/autoconfig.h:1058:0: warning: "PACKAGE_VERSION" redefined
./config.h:116:0: note: this is the location of the previous definition
In file included from 
/mnt/storage/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/asterisk-1.8.7
.1/include/asterisk/compat.h:37:0,
                 from /mnt/storage/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/asterisk-1.8.7.1/include/asterisk.h:27,
                 from app.c:17:
/mnt/storage/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-linaro_uClibc-0
.9.32/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/include/stddef.h:211:23: 
error: duplicate 'unsigned'
/mnt/storage/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-linaro_uClibc-0
.9.32/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/include/stddef.h:211:23: 
error: two or more data types in declaration specifiers
In file included from 
/mnt/storage/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/asterisk-1.8.7
.1/include/asterisk/compat.h:45:0,
                 from /mnt/storage/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/asterisk-1.8.7.1/include/asterisk.h:27,
                 from app.c:17:
/mnt/storage/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-linaro_uClibc-0
.9.32/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwrt-li
nux-uclibc/sys-include/sys/types.h:110:19: error: two or more data types in 
declaration specifiers
make[3]: *** [app.o] Error 1
make[3]: Leaving directory 
`/mnt/storage/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/chan_dongle-1
.1.r10'
make[2]: *** 
[/mnt/storage/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/chan_dongle-1
.1.r10/.built] Error 2
make[2]: Leaving directory 
`/usr/src/chan_dongle/contrib/openwrt/asterisk18-chan-dongle'
make[1]: *** [package/asterisk18-chan-dongle/compile] Error 2
make[1]: Leaving directory `/mnt/storage/openwrt/trunk'
make: *** [package/asterisk18-chan-dongle/compile] Error 2

What version of the product are you using?
latest SVN trunk

On what operating system?
Debian as the build source, OpenWrt as the target one.

Please provide any additional information below.
here is an translation of the same error report:
http://translate.googleusercontent.com/translate_c?hl=en&prev=/search%3Fq%3D%252
Bopenwrt%2B%252Bchan_dongle%2Berror:%2Btwo%2Bor%2Bmore%2Bdata%2Btypes%2Bin%2Bdec
laration%2Bspecifiers%26hl%3Den%26client%3Diceweasel-a%26rls%3Dorg.mozilla:en-US
:unofficial%26biw%3D1920%26bih%3D796%26prmd%3Dimvnsfd&rurl=translate.google.com&
sl=ru&twu=1&u=http://asteriskforum.ru/viewtopic.php%3Fp%3D58519&usg=ALkJrhgvXcmD
SVIw99Gf9zryBpBlUY_2rw



Original issue reported on code.google.com by adyd...@gmail.com on 20 Nov 2011 at 6:02

Attachments:

@GoogleCodeExporter
Copy link
Author

Any update on this bug? Is there anything I can do about it? Is there something 
I am doing wrong? Thank you!

Original comment by adyd...@gmail.com on 29 Dec 2011 at 12:54

@GoogleCodeExporter
Copy link
Author

I have the same problem with svn revision 24 and openwrt revision 29985.
I changed asterisk to 1.8.8.0.. but also the same error


make[4]: Entering directory 
`/home/goran/development/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/ch
an_dongle-1.1.r10'
mips-openwrt-linux-uclibc-gcc -Os -pipe -mips32r2 -mtune=mips32r2 
-fno-caller-saves -fhonour-copts -msoft-float -DLOW_MEMORY -D_XOPEN_SOURCE=600 
-I/home/goran/development/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.32
/usr/include 
-I/home/goran/development/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.32
/include 
-I/home/goran/development/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-li
naro_uClibc-0.9.32/usr/include 
-I/home/goran/development/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-li
naro_uClibc-0.9.32/include 
-I/home/goran/development/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.32
/usr/lib/libiconv-full/include 
-I/home/goran/development/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/a
sterisk-1.8.8.0/include -DHAVE_CONFIG_H -I. -fPIC  -o app.o -c app.c
In file included from 
/home/goran/development/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-lina
ro_uClibc-0.9.32/lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwr
t-linux-uclibc/sys-include/bits/types.h:31:0,
                 from /home/goran/development/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-linaro_uClibc-0.9.32/lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwrt-linux-uclibc/sys-include/unistd.h:188,
                 from /home/goran/development/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/asterisk-1.8.8.0/include/asterisk/compat.h:37,
                 from /home/goran/development/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/asterisk-1.8.8.0/include/asterisk.h:27,
                 from app.c:17:
/home/goran/development/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-lina
ro_uClibc-0.9.32/lib/gcc/mips-openwrt-linux-uclibc/4.5.4/include/stddef.h:211:23
: error: duplicate 'unsigned'
/home/goran/development/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-lina
ro_uClibc-0.9.32/lib/gcc/mips-openwrt-linux-uclibc/4.5.4/include/stddef.h:211:23
: error: two or more data types in declaration specifiers
In file included from 
/home/goran/development/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/ast
erisk-1.8.8.0/include/asterisk/compat.h:37:0,
                 from /home/goran/development/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/asterisk-1.8.8.0/include/asterisk.h:27,
                 from app.c:17:
/home/goran/development/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-lina
ro_uClibc-0.9.32/lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwr
t-linux-uclibc/sys-include/unistd.h:191:19: error: two or more data types in 
declaration specifiers
make[4]: *** [app.o] Error 1
make[4]: Leaving directory 
`/home/goran/development/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/ch
an_dongle-1.1.r10'
make[3]: *** 
[/home/goran/development/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/ch
an_dongle-1.1.r10/.built] Error 2
make[3]: Leaving directory 
`/home/goran/development/openwrt/chan-dongle/asterisk18-chan-dongle'
make[2]: *** [package/asterisk18-chan-dongle/compile] Error 2
make[2]: Leaving directory `/home/goran/development/openwrt/trunk'
make[1]: *** 
[/home/goran/development/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.32/
stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/goran/development/openwrt/trunk'
make: *** [world] Error 2

Original comment by goran.sk...@gmail.com on 5 Feb 2012 at 3:42

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Added ifndef in:

/home/goran/development/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-lina
ro_uClibc-0.9.32/lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwr
t-linux-uclibc/sys-include/unistd.h
#ifndef __ssize_t_defined
#ifndef CHANDONGLE
typedef __ssize_t ssize_t;
# define __ssize_t_defined
#endif
#endif



/home/goran/development/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-lina
ro_uClibc-0.9.32/lib/gcc/mips-openwrt-linux-uclibc/4.5.4/include/stddef.h
#ifndef CHANDONGLE
typedef __SIZE_TYPE__ size_t;
#endif



/home/goran/development/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-lina
ro_uClibc-0.9.32/lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwr
t-linux-uclibc/sys-include/sys/types.h
#ifndef CHANDONGLE
#ifndef __ssize_t_defined
typedef __ssize_t ssize_t;
#endif
#endif


And added -DCHANDONGLE in package/asterisk18-chan-dongle/Makefile:
MAKE_ARGS:= \
        CC="$(TARGET_CC)" \
        LD="$(TARGET_CC)" \
        CFLAGS="$(TARGET_CFLAGS) -DLOW_MEMORY -DCHANDONGLE -D_XOPEN_SOURCE=600 $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libiconv-full/include -I$(BUILD_DIR)/$(WITH_ASTERISK)/include -DHAVE_CONFIG_H -I. -fPIC" \
        LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libiconv-full/lib -liconv" \
        DESTDIR="$(PKG_INSTALL_DIR)/usr/lib/asterisk/modules"


Added ifndef CHANMOBILE

Original comment by goran.sk...@gmail.com on 5 Feb 2012 at 10:13

@GoogleCodeExporter
Copy link
Author

If someone correct those includes.. it would be better to correct there.. This 
way up there was the fastest for me.

Original comment by goran.sk...@gmail.com on 6 Feb 2012 at 9:38

@GoogleCodeExporter
Copy link
Author

I'm using Ubuntu x64 and have the same problem. In my case config.log shows 
"fatal error: bits/predefs.h: No such file or directory" while checking for 
size_t, and "apt-get install libc6-dev-i386" solve the problem.

Original comment by chengzhicn@gmail.com on 3 Feb 2013 at 3:01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant