Menu

#32 crosscompile openvpn-gui

question
open
None
5
2015-01-31
2013-05-08
No

Hi Heiko

I refer to the latest versions of configure.ac (2013-04-12) and options.h (2013-04-25).

After issuing the command make, the following error message popped up:

make all-am
make[1]: Entering directory `/home/johndoe/openvpn-gui-3'
/opt/mingw64/bin/x86_64-w64-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I/opt/openssl/include -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=NTDDI_WINXP -municode -g -O2 -pedantic -Wall -Wextra -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c

In file included
from tray.h:26:0,
from main.c:32:

options.h:104:31: error: ‘MAX_CONFIGS’ undeclared here (not in a function)
const TCHAR *auto_connect[MAX_CONFIGS];
^
make[1]: [main.o] Error 1
make[1]: Leaving directory `/home/johndoe/openvpn-gui-3'
make: [all] Error 2

I would appreciate it if you could fix the bug(s).

Thanks in advance.

Related

Issues: #32

Discussion

  • Heiko Hund

    Heiko Hund - 2013-06-06

    This looks like you have to generate configure again. If that doesn't work you may want to try with the v4 tarball again. I assume patching v3 went wrong then.

     

    Last edit: Heiko Hund 2013-06-06
  • Bowie Frisch

    Bowie Frisch - 2013-06-06

    Hi Heiko

    Thanks for your reply.

    I downloaded openvpn-gui-4.tar.gz and when I tried to "make", below are the errors:

    user@openvpn:~$ sudo su
    [sudo] password for user:
    root@openvpn:/home/user# cd /home/user/Downloads/openvpn-gui-4
    root@openvpn:/home/user/Downloads/openvpn-gui-4# make
    make all-am
    make[1]: Entering directory /home/user/Downloads/openvpn-gui-4' DHAVE_CONFIG_H -I. -I/opt/openssl/include -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=NTDDI_WINXP -i res/openvpn-gui-res.rc -o openvpn-gui-res.o /bin/bash: DHAVE_CONFIG_H: command not found make[1]: [openvpn-gui-res.o] Error 127 (ignored) /opt/mingw64/bin/x86_64-w64-mingw32-gcc -std=gnu99 -municode -g -O2 -pedantic -Wall -Wextra -mwindows -o openvpn-gui.exe main.o openvpn.o localization.o tray.o viewlog.o service.o options.o passphrase.o proxy.o registry.o scripts.o manage.o misc.o openvpn_config.o openvpn-gui-res.o -L/opt/openssl/lib -lcrypto -lws2_32 -lcomctl32 -lwinhttp -lwtsapi32 x86_64-w64-mingw32-gcc: error: openvpn-gui-res.o: No such file or directory make[1]: *** [openvpn-gui.exe] Error 1 make[1]: Leaving directory/home/user/Downloads/openvpn-gui-4'
    make: *** [all] Error 2
    root@openvpn:/home/user/Downloads/openvpn-gui-4#

    Heiko, could you tell me what has gone wrong, please?

     
  • Heiko Hund

    Heiko Hund - 2013-06-06

    DHAVE_CONFIG_H -I. -I/opt/openssl/include -D_UNICODE -DWIN32_LEAN_AND_MEAN
    -D_WIN32_WINNT=NTDDI_WINXP -i res/openvpn-gui-res.rc -o openvpn-gui-res.o
    /bin/bash: DHAVE_CONFIG_H: command not found

    There's your problem.

    No idea why the ressource compiler was not called correctly but that's why
    openvpn-gui-res.o is not produced. Was windres found by configure?

     
  • Heiko Hund

    Heiko Hund - 2013-06-06
    • Group: bug --> question
     
  • Bowie Frisch

    Bowie Frisch - 2013-06-06

    In "Makefile", I edited the following line to:

    WINDRES = /opt/mingw64/bin/x86_64-w64-mingw32-windres

    and in CFLAGS, I appended -L/opt/mingw64/lib

    Did I do it correctly?

    Once again thanks in advance for your help.


    From: Heiko Hund heikoh@users.sf.net
    To: [openvpn-gui:issues] 32@issues.openvpn-gui.p.re.sf.net
    Sent: Thursday, June 6, 2013 8:01 PM
    Subject: [openvpn-gui:issues] Re: #32 options.h contains a bug

    DHAVE_CONFIG_H -I. -I/opt/openssl/include -D_UNICODE -DWIN32_LEAN_AND_MEAN

    -D_WIN32_WINNT=NTDDI_WINXP -i res/openvpn-gui-res.rc -o openvpn-gui-res.o
    /bin/bash: DHAVE_CONFIG_H: command not found
    There's your problem.
    No idea why the ressource compiler was not called correctly but that's why
    openvpn-gui-res.o is not produced. Was windres found by configure?


    [issues:#32] options.h contains a bug
    Status: open
    Created: Wed May 08, 2013 12:28 AM UTC by Bowie Frisch
    Last Updated: Thu Jun 06, 2013 11:34 AM UTC
    Owner: Heiko Hund
    Hi Heiko
    I refer to the latest versions of configure.ac (2013-04-12) and options.h (2013-04-25).
    After issuing the command make, the following error message popped up:
    make all-am

    make[1]: Entering directory /home/johndoe/openvpn-gui-3' /opt/mingw64/bin/x86_64-w64-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I/opt/openssl/include -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=NTDDI_WINXP -municode -g -O2 -pedantic -Wall -Wextra -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c In file included from tray.h:26:0, from main.c:32: options.h:104:31: error: ‘MAX_CONFIGS’ undeclared here (not in a function) const TCHAR *auto_connect[MAX_CONFIGS]; ^ make[1]: [main.o] Error 1 make[1]: Leaving directory/home/johndoe/openvpn-gui-3'
    make: [all] Error 2
    I would appreciate it if you could fix the bug(s).
    Thanks in advance.


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/openvpn-gui/issues/32/
    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Issues: #32

  • Bowie Frisch

    Bowie Frisch - 2013-06-06

    I attach a file in plaintext containing the details of "make".

    Your help would be much appreciated.

     

    Last edit: Bowie Frisch 2013-06-06
  • Heiko Hund

    Heiko Hund - 2013-06-13
    • summary: options.h contains a bug --> crosscompile openvpn-gui
     
  • Heiko Hund

    Heiko Hund - 2013-06-13

    you need to run ./configure with the --host argument set to the host triple for the platform you are cross-compiling the GUI for. In my case (cygwin) this is:

    ./configure --host=x86_64-w64-mingw32

    followed by all the other configure options I use.

     
  • Bowie Frisch

    Bowie Frisch - 2013-06-13

    Below is the command that I have been using since the day the options.h file was amended, 2013-04-12:

    ./configure MAX_CONFIGS=350 --host=x86_64-w64-mingw32 --prefix=/opt/openvpn CC=/opt/mingw64/bin/x86_64-w64-mingw32-gcc PKG_CONFIG_PATH=/opt/openssl/lib/pkgconfig

     
  • Heiko Hund

    Heiko Hund - 2013-06-14

    You could link to x86_64-w64-mingw32-windres from /usr/bin so configure find it. Maybe that helps.

     
    • Bowie Frisch

      Bowie Frisch - 2013-06-14

      Hi Heiko,

      Thanks for your tip but I still got the same result.

      I hope you wouldn't mind me suggesting this: you would be a great help if you could create a Windows installer for your fans (I am one of them) with a MAX_CONFIGS=400 or 500 based on your most recent version 4 tarball.

      Thanks in advance.

      P.S.: There was a post on OpenVPN.net forum last year in which a request was made for OpenVPN-GUI to handle 500 ovpn files.

       

Log in to post a comment.