Skip to contentSkip to conversation

cmake is not building anymore

Buildroot Andy Shevchenko 4 participants 12 messages Mar 13, 2017 – Mar 20, 2017

lore
Share & tools
lore
#0 lore raw

Hi!

After update to 2017.02 followed by origin/2017.02.x cmake fails to compile.

output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_hmac.c: In function ?__hmac_sha1_cleanup?:
output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_hmac.c:203:24: error:
dereferencing pointer to incomplete type ?archive_hmac_sha1_ctx {aka struct hmac_ctx_st}?
? memset(ctx, 0, sizeof(*ctx)); ????????????????????????^~~~

Is it known issue?

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#1 lore raw
Quoted 15 lines · Andy Shevchenko

Hi!

After update to 2017.02 followed by origin/2017.02.x cmake fails to compile.

output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_hmac.c: In function ?__hmac_sha1_cleanup?:
output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_hmac.c:203:24: error:
dereferencing pointer to incomplete type ?archive_hmac_sha1_ctx {aka struct hmac_ctx_st}?
? memset(ctx, 0, sizeof(*ctx)); ????????????????????????^~~~

Quoted 1 line

Is it known issue?

Just did a clean build. Issue still stays.

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#2 lore raw
Quoted 21 lines

From: "Andy Shevchenko" <[email protected]>
To: "buildroot" <[email protected]>
Sent: Monday, March 13, 2017 12:54:44 PM
Subject: Re: [Buildroot] cmake is not building anymore

Quoted 15 lines · Andy Shevchenko

Hi!

After update to 2017.02 followed by origin/2017.02.x cmake fails to compile.

output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_hmac.c: In function ?__hmac_sha1_cleanup?:
output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_hmac.c:203:24: error:
dereferencing pointer to incomplete type ?archive_hmac_sha1_ctx {aka struct hmac_ctx_st}?
? memset(ctx, 0, sizeof(*ctx)); ????????????????????????^~~~

Quoted 3 lines
Quoted 1 line

Is it known issue?

Just did a clean build. Issue still stays.

I attempted to reproduce your problem but cmake build flawlessly:

    $ git checkout -b 2017.02.x origin/2017.02.x
    $ git --no-pager log -n 1 --pretty=oneline
    3bf15bfc84f646efbdeead006378265fa56855a9 libiio: explicitly disable matlab bindings
    [...]
    $ make host-cmake

Please provide some context information:

    $ make BR2_DEFCONFIG=$PWD/my_defconfig savedefconfig; cat my_defconfig
    $ uname -a
    $ cat /etc/lsb-release 
    $ gcc --version
Signature · 4 lines
Carlos Santos (Casantos) - DATACOM, P&D
?The greatest triumph that modern PR can offer is the transcendent 
success of having your words and actions judged by your reputation, 
rather than the other way about.? ? Christopher Hitchens
#3 lore raw
Quoted 37 lines · Carlos Santos
Quoted 24 lines

From: "Andy Shevchenko" <[email protected]>
To: "buildroot" <[email protected]>
Sent: Monday, March 13, 2017 12:54:44 PM
Subject: Re: [Buildroot] cmake is not building anymore

Quoted 19 lines · Andy Shevchenko

Hi!

After update to 2017.02 followed by origin/2017.02.x cmake fails to
compile.

output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_hmac.c: In function
?__hmac_sha1_cleanup?:
output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_hmac.c:203:24:
error:
dereferencing pointer to incomplete type ?archive_hmac_sha1_ctx {aka
struct hmac_ctx_st}?
? memset(ctx, 0, sizeof(*ctx)); ????????????????????????^~~~

Quoted 3 lines
Quoted 1 line

Is it known issue?

Just did a clean build. Issue still stays.

I attempted to reproduce your problem but cmake build flawlessly:

????$ git checkout -b 2017.02.x origin/2017.02.x ????$ git --no-pager log -n 1 --pretty=oneline ????3bf15bfc84f646efbdeead006378265fa56855a9 libiio: explicitly disable matlab bindings
????[...]
????$ make host-cmake

Quoted 8 lines

Please provide some context information:

????$ make BR2_DEFCONFIG=$PWD/my_defconfig savedefconfig; cat my_defconfig
????$ uname -a
????$ cat /etc/lsb-release?
????$ gcc --version

Below you may find the information you asked for

What I did (2017.02):

$ git clean -xdf
# I suppose you agree this is more stronger than make clean
$ make defconfig
$ make

--- 8< --- 8< ---

[ 65%] Linking C static library libcmcurl.a

In file included from .../output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_write_set_format_zip.c:5 2:0:
.../output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:107:17 : error: field ?ctx? has incomplete type
??EVP_CIPHER_CTX ctx;
?????????????????^~~
--- 8< --- 8< ---

100% reproducible

$ uname -a

Linux XXX 4.9.0-1-amd64 #1 SMP Debian 4.9.6-3 (2017-01-28) x86_64 GNU/Linux

$ cat /etc/lsb-release
There is no such file, it's Debian testing system.
$ gcc --version
gcc (Debian 6.2.0-6) 6.2.0 20161010

Here is defconfig I'm using:

# Architecture
BR2_i386=y
BR2_x86_i586=y

# Misc
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y

# Root FS
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_CPIO_BZIP2=y

# Root FS hooks BR2_ROOTFS_POST_BUILD_SCRIPT="board/intel/common/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/intel/common/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS=""

# Common
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y

# Host tools
BR2_PACKAGE_HOST_ACPICA=y
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_HOST_PARTED=y

# Packages
BR2_PACKAGE_EFIBOOTMGR=y
BR2_PACKAGE_KEXEC=y
BR2_PACKAGE_KEXEC_ZLIB=y
BR2_PACKAGE_LRZSZ=y
BR2_PACKAGE_SCREEN=y
BR2_PACKAGE_PCIUTILS=y
BR2_PACKAGE_MTD=y
BR2_PACKAGE_MTD_MKFSUBIFS=y
BR2_PACKAGE_MTD_MTDPART=y
BR2_PACKAGE_MMC_UTILS=y
BR2_PACKAGE_DMIDECODE=y
BR2_PACKAGE_ARGP_STANDALONE=y
BR2_PACKAGE_LINUX_FIRMWARE=y
BR2_PACKAGE_LINUX_FIRMWARE_INTEL_SST_DSP=y
BR2_PACKAGE_ALSA_UTILS=y
BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y
BR2_PACKAGE_LIBIIO=y
BR2_PACKAGE_LIBIIO_TESTS=y
BR2_PACKAGE_ACPID=y
BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y
BR2_PACKAGE_IW=y
BR2_PACKAGE_RFKILL=y
BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL=y
BR2_PACKAGE_BLUEZ5_UTILS=y
BR2_PACKAGE_FB_TEST_APP=y
BR2_PACKAGE_FBV=y
BR2_PACKAGE_MSR_TOOLS=y

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#4 lore raw
Quoted 27 lines

From: "Andy Shevchenko" <[email protected]>
To: "Carlos Santos" <[email protected]>
Cc: "buildroot" <[email protected]>
Sent: Wednesday, March 15, 2017 12:10:57 PM
Subject: Re: [Buildroot] cmake is not building anymore

On Tue, 2017-03-14 at 22:02 -0300, Carlos Santos wrote:

$ git clean -xdf
# I suppose you agree this is more stronger than make clean
$ make defconfig
$ make

--- 8< --- 8< ---

[ 65%] Linking C static library libcmcurl.a

In file included from .../output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_write_set_format_zip.c:5 2:0:
.../output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:107:17 : error: field ?ctx? has incomplete type
??EVP_CIPHER_CTX ctx;
?????????????????^~~
--- 8< --- 8< ---

Quoted 1 line

100% reproducible

If you use "make BR2_JLEVEL=1" the compilation will stop at the first error and it will be easier to identify the cause. I guess you don't have the openssl-dev package installed on the host machine neither built host-openssl in buildroot, since EVP_CIPHER_CTX is defined in openssl/ossl_typ.h.

Signature · 4 lines
Carlos Santos (Casantos) - DATACOM, P&D
?The greatest triumph that modern PR can offer is the transcendent 
success of having your words and actions judged by your reputation, 
rather than the other way about.? ? Christopher Hitchens
#5 lore raw
Quoted 28 lines · Carlos Santos
Quoted 28 lines

From: "Andy Shevchenko" <[email protected]>
To: "Carlos Santos" <[email protected]>
Cc: "buildroot" <[email protected]>
Sent: Wednesday, March 15, 2017 12:10:57 PM
Subject: Re: [Buildroot] cmake is not building anymore On Tue, 2017-03-14 at 22:02 -0300, Carlos Santos wrote:

$ git clean -xdf
# I suppose you agree this is more stronger than make clean
$ make defconfig
$ make

--- 8< --- 8< ---

[ 65%] Linking C static library libcmcurl.a

In file included from .../output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_write_set_format_zip .c:5
2:0:
.../output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:10 7:17
: error: field ?ctx? has incomplete type
??EVP_CIPHER_CTX ctx;
?????????????????^~~
--- 8< --- 8< ---

Quoted 4 lines
Quoted 1 line

100% reproducible

If you use "make BR2_JLEVEL=1" the compilation will stop at the first error and it will be easier to identify the cause.

This is *first* error.

Quoted 3 lines

I guess you don't have the openssl-dev package installed on the host
machine neither built host-openssl in buildroot, since EVP_CIPHER_CTX is defined in openssl/ossl_typ.h.

It is installed.

$ dpkg -l \*ssl-dev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-
aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name???????????????????Version??????????Architecture?????Description
+++-======================-================-================-
==================================================
...
ii??libcurl4-openssl-dev:a 7.52.1-3?????????amd64????????????development 
files and documentation for libcurl (O
...
ii??libssl-dev:amd64???????1.1.0e-1?????????amd64????????????Secure
Sockets Layer toolkit - development files
Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#6 lore raw
Quoted 63 lines

From: "Andy Shevchenko" <[email protected]>
To: "Carlos Santos" <[email protected]>
Cc: "buildroot" <[email protected]>
Sent: Wednesday, March 15, 2017 2:23:33 PM
Subject: Re: [Buildroot] cmake is not building anymore

Quoted 28 lines · Carlos Santos
Quoted 28 lines

From: "Andy Shevchenko" <[email protected]>
To: "Carlos Santos" <[email protected]>
Cc: "buildroot" <[email protected]>
Sent: Wednesday, March 15, 2017 12:10:57 PM
Subject: Re: [Buildroot] cmake is not building anymore On Tue, 2017-03-14 at 22:02 -0300, Carlos Santos wrote:

$ git clean -xdf
# I suppose you agree this is more stronger than make clean
$ make defconfig
$ make

--- 8< --- 8< ---

[ 65%] Linking C static library libcmcurl.a

In file included from .../output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_write_set_format_zip .c:5
2:0:
.../output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:10 7:17
: error: field ?ctx? has incomplete type
??EVP_CIPHER_CTX ctx;
?????????????????^~~
--- 8< --- 8< ---

Quoted 4 lines
Quoted 1 line

100% reproducible

If you use "make BR2_JLEVEL=1" the compilation will stop at the first error and it will be easier to identify the cause.

This is *first* error.

Quoted 3 lines

I guess you don't have the openssl-dev package installed on the host
machine neither built host-openssl in buildroot, since EVP_CIPHER_CTX is defined in openssl/ossl_typ.h.

It is installed.

$ dpkg -l \*ssl-dev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-
aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name???????????????????Version??????????Architecture?????Description
+++-======================-================-================-
==================================================
...
ii??libcurl4-openssl-dev:a 7.52.1-3?????????amd64????????????development
files and documentation for libcurl (O
...
ii??libssl-dev:amd64???????1.1.0e-1?????????amd64????????????Secure
Sockets Layer toolkit - development files
Quoted 3 lines

--
Andy Shevchenko <[email protected]> Intel Finland Oy

Ouch! Does it build using host-openssl, instead?

Signature · 4 lines
Carlos Santos (Casantos) - DATACOM, P&D
?The greatest triumph that modern PR can offer is the transcendent 
success of having your words and actions judged by your reputation, 
rather than the other way about.? ? Christopher Hitchens
#7 lore raw
Quoted 45 lines · Carlos Santos
Quoted 45 lines

From: "Andy Shevchenko" <[email protected]>
To: "Carlos Santos" <[email protected]>
Cc: "buildroot" <[email protected]>
Sent: Wednesday, March 15, 2017 2:23:33 PM
Subject: Re: [Buildroot] cmake is not building anymore

Quoted 24 lines · Carlos Santos
Quoted 24 lines
$ git clean -xdf
# I suppose you agree this is more stronger than make clean
$ make defconfig
$ make

--- 8< --- 8< ---

[ 65%] Linking C static library libcmcurl.a

In file included from .../output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_write_set_format _zip
.c:5
2:0:
.../output/build/host-cmake- 3.6.3/Utilities/cmlibarchive/libarchive/archive_cryptor_private. h:10
7:17
: error: field ?ctx? has incomplete type ??EVP_CIPHER_CTX ctx;
?????????????????^~~
--- 8< --- 8< ---

Quoted 5 lines
Quoted 1 line

100% reproducible

If you use "make BR2_JLEVEL=1" the compilation will stop at the first
error and it will be easier to identify the cause.

This is *first* error.

Quoted 5 lines

?I guess you don't have the openssl-dev package installed on the host
machine neither built host-openssl in buildroot, since EVP_CIPHER_CTX
is defined in openssl/ossl_typ.h.

Quoted 8 lines
Quoted 6 lines

It is installed.

$ dpkg -l \*ssl-dev

ii??libssl-dev:amd64???????1.1.0e-1?????????amd64????????????Secure Sockets Layer toolkit - development files

Ouch! Does it build using host-openssl, instead?

At least I don't see any folder like that in output/.

$ ls -1d output/build/*ssl*
ls: cannot access 'output/build/*ssl*': No such file or directory
Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#8 lore raw

Hi Andy,

Quoted 7 lines · Andy Shevchenko
Quoted 1 line · Carlos Santos

Ouch! Does it build using host-openssl, instead?

At least I don't see any folder like that in output/.

$ ls -1d output/build/*ssl*
ls: cannot access 'output/build/*ssl*': No such file or directory

What Carlos suggests is to build host-openssl manually

make host-openssl

and then rerun the cmake build

rm -r output/build/host-cmake*
make host-cmake

Does that work?

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#9 lore raw
Quoted 13 lines · Baruch Siach

Hi Andy,

Quoted 7 lines · Andy Shevchenko
Quoted 1 line · Carlos Santos

Ouch! Does it build using host-openssl, instead?

At least I don't see any folder like that in output/.

$ ls -1d output/build/*ssl*
ls: cannot access 'output/build/*ssl*': No such file or directory

What Carlos suggests is to build host-openssl manually

Quoted 8 lines

? make host-openssl

and then rerun the cmake build

? rm -r output/build/host-cmake*
? make host-cmake

Does that work?

Yes, it does with rm -rf (I tried before with make host-cmake-clean- for-reconfigutre, that didn't help)

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#10 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Andy" == Andy Shevchenko <[email protected]> writes:

Hi,

Quoted 7 lines
Quoted 4 lines

? rm -r output/build/host-cmake*
? make host-cmake

Does that work?

Yes, it does with rm -rf (I tried before with make host-cmake-clean- for-reconfigutre, that didn't help)

Ok, that is good at least. So I guess the solution is to convince cmake to build its embedded libarchive copy without openssl support, or to move to system libraries and add host-libarchive to the dependencies.

Signature · 1 line
Bye, Peter Korsgaard
#11 lore raw
Quoted 10 lines · Peter Korsgaard
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Andy" == Andy Shevchenko <[email protected]

Quoted 1 line

writes:

Hi,

?>> ? rm -r output/build/host-cmake*
?>> ? make host-cmake
?>>?
?>> Does that work?

Quoted 8 lines

?> Yes, it does with rm -rf (I tried before with make host-cmake- clean-
?> for-reconfigutre, that didn't help)

Ok, that is good at least. So I guess the solution is to convince cmake
to build its embedded libarchive copy without openssl support, or to move to system libraries and add host-libarchive to the dependencies.

So, is anyone going to fix it?

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy