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

Compilation failed #23

Closed
mylamour opened this issue Nov 4, 2020 · 5 comments
Closed

Compilation failed #23

mylamour opened this issue Nov 4, 2020 · 5 comments
Assignees

Comments

@mylamour
Copy link

mylamour commented Nov 4, 2020

I try to compile it my ubuntu. but here is the problem. even i installed the pkg-config

image

Once I removed the square brackets around the AC_MSG_ERROR and AC_MSG_WARN macro, it worked

49-50line:

AX_PROG_FLEX([],AC_MSG_WARN([GNU flex is required to regenerate lexer. Generated source code is provided, so it should be OK, until you change the lexer source file. Hint: use LEX variable to point to flex on your system.]))
AX_PROG_FLEX_VERSION([2.5.0],[],AC_MSG_WARN([GNU flex 2.5+ is required to regenerate lexer. Generated source code is provided, so it should be OK, until you change the lexer source file.]))

55-56line:

AX_PROG_BISON([],AC_MSG_WARN([GNU bison is required to regenerate parser. Generated source code is provided, so it should be OK, until you change the parser source file.]))
AX_PROG_BISON_VERSION([3.0.0],[],AC_MSG_WARN([GNU bison v3+ is required to regenerate parser. Generated source code is provided, so it should be OK, until you change the parser source file. Hint: use YACC variable to point to bison on your system.]))

88line:

AC_SEARCH_LIBS([dlopen], [dl dld], [], AC_MSG_ERROR([unable to find the dlopen() function]) )

But when i start to ./configure , it was another problem:

ian@star01:~/Desktop/pkcs11-tools$ ./configure 
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for gcc option to accept ISO C99... none needed
checking for perl... /usr/bin/perl
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gtar... no
checking for tar... tar
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
./configure: line 4744: syntax error near unexpected token `,{'
./configure: line 4744: `AX_PROG_FLEX(,{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU flex is required to regenerate lexer. Generated source code is provided, so it should be OK, until you change the lexer source file. Hint: use LEX variable to point to flex on your system." >&5'

Here is the OS and releated info:

Linux star01 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
autoreconf (GNU Autoconf) 2.69
@mylamour mylamour changed the title AC_MSG_ERR & AC_MSG_WARN Problem Compilation failed Nov 4, 2020
@keldonin
Copy link
Contributor

keldonin commented Nov 9, 2020

Hi @mylamour, Thanks for reporting this. Let me check the issue on my side.

@keldonin
Copy link
Contributor

keldonin commented Nov 9, 2020

I have tried on a fresh Ubuntu 20.10 (the latest avail version), it did work without any problem.
Also, Have you installed pkg-config ? I see this is missing in the list of required packages.

@mylamour
Copy link
Author

Hi, @keldonin Thanks for your reply, i'm sure pkg-config was installed at first. and my ubuntu was fresh almost.

@keldonin keldonin self-assigned this Nov 10, 2020
@keldonin
Copy link
Contributor

The project should compile without having to modify configure.ac. May I suggest you revert back to the original commit from the repo, and let's see if we can identify the issue from there.

  1. Can you execute the following command? older versions of autotools might cause the issue.

    dpkg -l autoconf-archive autoconf automake libtool pkg-config
    

    Here is the result on my platform:

    dpkg -l autoconf-archive autoconf automake libtool pkg-config
    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  autoconf         2.69-11.1           all          automatic configure script builder
    ii  autoconf-archive 20190106-2.1ubuntu1 all          Autoconf Macro Archive
    ii  automake         1:1.16.2-4ubuntu1   all          Tool for generating GNU Standards-compliant Makefiles
    ii  libtool          2.4.6-14            all          Generic library support script
    ii  pkg-config       0.29.2-1ubuntu1     amd64        manage compile and link flags for libraries
    
  2. Also, make sure that autoconf-archive is deployed. (This should be revealed by the previous command)

  3. Finally, can you execute this command, to identify the exact version of your Ubuntu and share the result, so I can try to reproduce the issue:

    lsb_release -a
    

Thanks,

@mylamour
Copy link
Author

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  autoconf         2.69-11.1         all          automatic configure script builder
un  autoconf-archive <none>            <none>       (no description available)
ii  automake         1:1.16.1-4ubuntu6 all          Tool for generating GNU Standards-compliant Makefiles
ii  libtool          2.4.6-14          all          Generic library support script
ii  pkg-config       0.29.1-0ubuntu4   amd64        manage compile and link flags for libraries
~

Look like i missed autoconf-archive. thanks @keldonin

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

No branches or pull requests

2 participants