Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 700784 - sys-fs/dislocker-0.7.1-r2 : /.../config.c:59:6: error: expected identifier or ( before numeric constant
Summary: sys-fs/dislocker-0.7.1-r2 : /.../config.c:59:6: error: expected identifier or...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreas Schürch
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-11-20 15:26 UTC by Toralf Förster
Modified: 2021-04-17 11:40 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.49 KB, text/plain)
2019-11-20 15:26 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,150.82 KB, text/plain)
2019-11-20 15:26 UTC, Toralf Förster
Details
environment (environment,87.14 KB, text/plain)
2019-11-20 15:26 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,13.26 KB, application/x-bzip)
2019-11-20 15:26 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,3.54 KB, application/x-bzip)
2019-11-20 15:26 UTC, Toralf Förster
Details
sys-fs:dislocker-0.7.1-r2:20191119-231358.log (sys-fs:dislocker-0.7.1-r2:20191119-231358.log,19.35 KB, text/plain)
2019-11-20 15:26 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,23.45 KB, application/x-bzip)
2019-11-20 15:26 UTC, Toralf Förster
Details
sys-fs/dislocker-0.7.1-r2.ebuild patch (dislocker-0.7.1-r2.ebuild.patch,1.11 KB, patch)
2020-03-04 12:14 UTC, mehw
Details | Diff
sys-fs/dislocker-0.7.1-r2.ebuild files (dislocker-0.7.1-fix-find-ruby.patch,25.33 KB, patch)
2020-03-04 12:14 UTC, mehw
Details | Diff
sys-fs/dislocker-9999.ebuild patch (dislocker-9999.ebuild.patch,990 bytes, patch)
2020-03-04 12:15 UTC, mehw
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2019-11-20 15:26:08 UTC
                 from /var/tmp/portage/sys-fs/dislocker-0.7.1-r2/work/dislocker-0.7.1/src/config.c:28:
/var/tmp/portage/sys-fs/dislocker-0.7.1-r2/work/dislocker-0.7.1/src/config.c: In function ‘setclearkey’:
/var/tmp/portage/sys-fs/dislocker-0.7.1-r2/work/dislocker-0.7.1/src/config.c:59:6: error: expected identifier or ‘(’ before numeric constant
   59 |  int true = TRUE;
      |      ^~~~
/var/tmp/portage/sys-fs/dislocker-0.7.1-r2/work/dislocker-0.7.1/src/config.c:60:45: error: lvalue required as unary ‘&’ operand

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_gnome_systemd-libressl-20191117-001539

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.2.0 *

clang:
clang version 9.0.0 (tags/RELEASE_900/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/9/bin
llvm:
9.0.0
Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.39.0 *



repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Tue, 19 Nov 2019 23:06:16 +0000

emerge -qpvO sys-fs/dislocker
[ebuild  N    ] sys-fs/dislocker-0.7.1-r2  USE="ruby"
Comment 1 Toralf Förster gentoo-dev 2019-11-20 15:26:11 UTC
Created attachment 596894 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2019-11-20 15:26:14 UTC
Created attachment 596896 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2019-11-20 15:26:17 UTC
Created attachment 596898 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2019-11-20 15:26:20 UTC
Created attachment 596900 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2019-11-20 15:26:23 UTC
Created attachment 596902 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2019-11-20 15:26:25 UTC
Created attachment 596904 [details]
sys-fs:dislocker-0.7.1-r2:20191119-231358.log
Comment 7 Toralf Förster gentoo-dev 2019-11-20 15:26:28 UTC
Created attachment 596906 [details]
temp.tbz2
Comment 8 Hank Leininger 2020-01-13 23:30:01 UTC
FWIW I was not able to reproduce this; dislocker-0.7.1-r2 built fine for me with various combinations of:

- gcc-8.3.0-r3
- gcc-9.2.0-r2
- mbedtls-2.17.0
- mbedtls-2.19.1
- USE="-ruby"
- USE="ruby" with ruby-2.4.9
- USE="ruby" with ruby-2.5.7
Comment 9 mehw 2020-03-04 12:14:13 UTC
Created attachment 617036 [details, diff]
sys-fs/dislocker-0.7.1-r2.ebuild patch

Hello,

I got the same error as the one in the description.

I prepared patches for both dislocker-0.7.1-r2.ebuild and dislocker-9999.ebuild, which are briefly described below.

dislocker-0.7.1-r2.ebuild also requires the dislocker-0.7.1-fix-find-ruby.patch to be put into the files directory.


In dislocker-0.7.1-r2.ebuild only
=================================

Fix compilation failure when the ruby useflag is set by replacing/adding new FindPackageHandleStandardArgs.cmake, FindPackageMessage.cmake, and FindRuby.cmake files: https://github.com/Aorimn/dislocker/commit/4596f1719b8458feca041ea26a546c37630b5e77


In both dislocker-0.7.1-r2.ebuild and dislocker-9999.ebuild
===========================================================

1. Update copyright.

2. Remove unneeded search and replace:
   sed 's:\.\./man:'../../${P}/man':g' -i "${S}/src/CMakeLists.txt" || die

3. Make symlink to /usr/share/man/man1/dislocker.1 rather than to /usr/share/man/man1/dislocker.1.gz

4. Fix colliding files found by ecompress:
   /usr/share/man/man1/dislocker-file.1
   /usr/share/man/man1/dislocker-file.1.gz
   /usr/share/man/man1/dislocker-find.1
   /usr/share/man/man1/dislocker-find.1.gz
   /usr/share/man/man1/dislocker-fuse.1
   /usr/share/man/man1/dislocker-fuse.1.gz

5. Do not install dislocker-find.1 when the ruby useflag isn't set.
Comment 10 mehw 2020-03-04 12:14:56 UTC
Created attachment 617038 [details, diff]
sys-fs/dislocker-0.7.1-r2.ebuild files
Comment 11 mehw 2020-03-04 12:15:24 UTC
Created attachment 617040 [details, diff]
sys-fs/dislocker-9999.ebuild patch
Comment 12 mehw 2020-03-04 13:34:29 UTC
I forgot to mention that both sys-fs/dislocker-0.7.1-r2 and sys-fs/dislocker-9999 compile fine on my platform (amd64) with cmake/FindRuby.cmake removed from their respective source directory (I currently use dev-util/cmake-3.16.4, dev-util/ninja-1.8.2, and dev-lang/ruby-2.5.7):

# export USE=ruby
# cd /usr/portage/sys-fs/dislocker
# ebuild dislocker-0.7.1-r2.ebuild unpack
# rm /var/tmp/portage/sys-fs/dislocker-0.7.1-r2/work/dislocker-0.7.1/cmake/FindRuby.cmake
# ebuild dislocker-0.7.1-r2.ebuild compile
Comment 13 Andreas Sturmlechner gentoo-dev 2020-07-11 20:00:03 UTC
Maintainer, please use the opportunity and switch the ebuild to cmake.eclass.

(In reply to mehw from comment #12)
> I forgot to mention that both sys-fs/dislocker-0.7.1-r2 and
> sys-fs/dislocker-9999 compile fine on my platform (amd64) with
> cmake/FindRuby.cmake removed from their respective source directory
Use CMAKE_REMOVE_MODULES_LIST from cmake.eclass for that.
Comment 14 Andreas Schürch gentoo-dev 2020-07-27 14:53:23 UTC
Thanks for the patches mehw!

This is committed now as -r3 ebuild.

Thanks all and sorry for the delay.
Comment 15 Larry the Git Cow gentoo-dev 2021-04-17 11:40:59 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68a682a2301bec17bfbd0dc887d9f490669471b0

commit 68a682a2301bec17bfbd0dc887d9f490669471b0
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-04-05 12:36:41 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-04-17 11:40:48 +0000

    sys-fs/dislocker: Tidyup, DESCRIPTION w/o PN
    
    - Unnecessary ${S}
    - local mycmakeargs
    - missing || die
    
    Bug: https://bugs.gentoo.org/700784
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 sys-fs/dislocker/dislocker-0.7.1-r3.ebuild | 21 ++++++++++-----------
 sys-fs/dislocker/dislocker-9999.ebuild     | 21 ++++++++++-----------
 2 files changed, 20 insertions(+), 22 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d68d66d417b3d1d265ef66ac9b0089458d8ed3c

commit 3d68d66d417b3d1d265ef66ac9b0089458d8ed3c
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-04-05 12:33:36 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-04-17 11:40:48 +0000

    sys-fs/dislocker: Drop 0.7.1-r2, cmake-utils--
    
    Bug: https://bugs.gentoo.org/700784
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 sys-fs/dislocker/dislocker-0.7.1-r2.ebuild | 50 ------------------------------
 1 file changed, 50 deletions(-)