wrcad / xictools

XicTools: Xic graphical editor, WRspice circuit simulator, and accessories. for electronic design.
http://wrcad.com
138 stars 40 forks source link

Win10 XicTools-4.3 Failed DLL #12

Open Servinjesus1 opened 2 years ago

Servinjesus1 commented 2 years ago

I cannot install XicTools-4.3(.11) on Windows 10.

I followed the guide for Windows and used the wr_install script under MSYS2 MingGW x64's terminal to install xictools, wrspice, mrouter, and mozy. However, attempting to load xic or wrspice (via either winpty xic or xic) in the MingGW terminal gives a Failed to load the program DLL error (program -> WRspice for wrspice).

In Windows, Xic is registered as a program that points to C:\usr\local\xictools\xic.current\bin\xic.bat. Opening this gives an Entry Point Not Found error:

The procedure entry point _ZdaPv could not be located in the dynamic link library c:\usr\local\xictools\xic\bin\xic.dll.`
suprcondcircuiter commented 2 years ago

Same problem, "winpty wrspice" always returns "Failed to load WRSpice DLL". Only solution I found is to install virtual box with ubuntu on it, for Linux I managed to install it after all.

wrcad commented 2 years ago

In the Windows Start menu, there are 3 choices under "MSYS2 64bit". You must choose "MSYS2 MinGW 64bit" to run the XicTools programs (which require MinGW). In particular, if you try to use "MSYS2 MSYS", you'll get the "Failed to load..." message.

suprcondcircuiter commented 2 years ago

In the Windows Start menu, there are 3 choices under "MSYS2 64bit". You must choose "MSYS2 MinGW 64bit" to run the XicTools programs (which require MinGW). In particular, if you try to use "MSYS2 MSYS", you'll get the "Failed to load..." message.

Thank you for the reply! I do not think it is the problem though. My start menu looks like this and I tried all of them, It's always "failed to load..". 2022-03-20_13-42-12 2022-03-20_13-50-09

wrcad commented 2 years ago

The message in the image above "mount: warning - /usr/local/xictools does not exist." may be a clue. This should exist. you should be able to cd /usr/local/xictools ls bin see in the listing xic.bat, xic.dll, xic.exe and/or wrspice.dll, wrspice.exe etc. /usr/local/xictools/bin should be in your shell search path. Listing /usr/local/xictools should show directory xic.current, and a link to this directory named "xic". Similar for wrspice.current and wrspice. ls -l bin will show that most of the contents are links to xic/bin or wrspice/bin

At least, this is the intended structure. There may be a problem mounting /usr/local/xictools, or there may be problems with the links (symbolic links are new to Windows and may require special permission such as administrator mode to use).

suprcondcircuiter commented 2 years ago

I think all this intended structure exists (see the 1st screenshot), the reason for this mounting warning (as I understand it) is that it is checking not c:/usr/local for the /xictools folder, but c:/msys64/usr/local instead, and indeed there is only folder called /etc there. If I understand correctly the idea of the mounting is to map from c:/usr/local/xictools to c:/msys64/usr/local/xictools. I think it worked in a sense that if I do cd /usr/local/xictools in the shell, it shows me everything inside c:/usr/local/xictools. The 2nd screenshot is how I changed ~/.bash_profile - do you think it is correct? 2022-03-20_20-03-36 2022-03-20_20-07-38

Mengfei-Zhao commented 2 years ago

I have the same problem as you.

tanaka-yasumoto commented 1 year ago

I am trying to install XIC in the Win 11 computer. Because self-extracting files did not work, I am challenging full compiling the sources on MSYS mingw64 OS. Is there any person who is still active in this room?

I put all of sources on c:\usr\local\xictools.

make config generated many errors. I will resolve these errors step by step.

I modified one line in the makefile. MINGW = --enable-mingw=/mingw64 I did not set GTKLOC because I found the description “gtk2-bundle” is no longer needed in “http://wrcad.com/xictools/index.html

The errors (generated by make config) are :

configure:3931: /mingw64/bin/gcc -V >&5 gcc.exe: error: unrecognized command-line option '-V' gcc.exe: fatal error: no input files

It might be OK that I leave it as it is. These lines might be just for checking version of gcc. A next error

configure:4960: /mingw64/bin/gcc -E conftest.c conftest.c:11:10: fatal error: ac_nonexistent.h: No such file or directory

I do not have any idea to resolve this error at this moment

And more errors made me give up configure:5047: checking for X configure:5085: /mingw64/bin/gcc -o conftest.exe -g -O2 conftest.c -lX11 >&5 In file included from C:/msys64/mingw64/include/X11/Xlib.h:31, from conftest.c:11: C:/msys64/mingw64/include/X11/X.h:44:26: error: expected '=', ',', ';', 'asm' or 'attribute' before 'XID' 44 | typedef unsigned __int64 XID; | ^~~ C:/msys64/mingw64/include/X11/X.h:49:9: error: unknown type name 'XID' 49 | typedef XID Window; | ^~~ C:/msys64/mingw64/include/X11/X.h:50:9: error: unknown type name 'XID' 50 | typedef XID Drawable; | ^~~ C:/msys64/mingw64/include/X11/X.h:51:9: error: unknown type name 'XID' 51 | typedef XID Font; | ^~~ C:/msys64/mingw64/include/X11/X.h:52:9: error: unknown type name 'XID' 52 | typedef XID Pixmap; | ^~~

When there is someone to give me a clue to overcome these errors, please give me some advices.

wrcad commented 1 year ago

Hi,

First, I updated new Windows packages recently and the present packages should work, at least on Windows 10. The problem was a version change of libtiff.

As far as I know, no-one has built xictools using Windows 11, so there may be some unknowns.

First, don’t put your build area in c:/usr/local/xictools, that is where the compiled programs will be installed. Install the source tree somewhere else, such as your MSYS home directory.

Second, you must set the GTKLOC variable in the Makefile. Mine is set to GTKLOC = —enable-gtk2=/mingw64/bin

There is also the question of which branch of the xictools repository to build. The “master” branch is safest and stable but rather old. The “devel” branch includes a lot of new work, including the port to QT graphics in progress. This branch would be recommended as it has the latest work. If you cloned the repository from GitHub, you can switch between branches with “git checkout devel” and "git checkout master”.

Regards, Steve

On May 22, 2023, at 3:35 AM, tanaka-yasumoto @.***> wrote:

I am trying to install XIC in the Win 11 computer. Because self-extracting files did not work, I am challenging full compiling the sources on MSYS mingw64 OS. Is there any person who is still active in this room?

I put all of sources on c:\usr\local\xictools.

make config generated many errors. I will resolve these errors step by step.

I modified one line in the makefile. MINGW = --enable-mingw=/mingw64 I did not set GTKLOC because I found the description “gtk2-bundle” is no longer needed in “http://wrcad.com/xictools/index.html

The errors (generated by make config) are :

configure:3931: /mingw64/bin/gcc -V >&5 gcc.exe: error: unrecognized command-line option '-V' gcc.exe: fatal error: no input files

It might be OK that I leave it as it is. These lines might be just for checking version of gcc. A next error

configure:4960: /mingw64/bin/gcc -E conftest.c conftest.c:11:10: fatal error: ac_nonexistent.h: No such file or directory

I do not have any idea to resolve this error at this moment

And more errors made me give up configure:5047: checking for X configure:5085: /mingw64/bin/gcc -o conftest.exe -g -O2 conftest.c -lX11 >&5 In file included from C:/msys64/mingw64/include/X11/Xlib.h:31, from conftest.c:11: C:/msys64/mingw64/include/X11/X.h:44:26: error: expected '=', ',', ';', 'asm' or 'attribute' before 'XID' 44 | typedef unsigned __int64 XID; | ^~~ C:/msys64/mingw64/include/X11/X.h:49:9: error: unknown type name 'XID' 49 | typedef XID Window; | ^~~ C:/msys64/mingw64/include/X11/X.h:50:9: error: unknown type name 'XID' 50 | typedef XID Drawable; | ^~~ C:/msys64/mingw64/include/X11/X.h:51:9: error: unknown type name 'XID' 51 | typedef XID Font; | ^~~ C:/msys64/mingw64/include/X11/X.h:52:9: error: unknown type name 'XID' 52 | typedef XID Pixmap; | ^~~

When there is someone to give me a clue to overcome these errors, please give me some advices.

— Reply to this email directly, view it on GitHub https://github.com/wrcad/xictools/issues/12#issuecomment-1556977833, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEZ4PVDWEHV27NU25KMYML3XHM6OXANCNFSM5L5GQ6LQ. You are receiving this because you commented.

tanaka-yasumoto commented 1 year ago

Thank you so much for your advices. It is so lucky that the master of XIC kindly & promptly replied. I hope I will be able to continue my challenge under your kind support.

tanaka-yasumoto commented 1 year ago

I tried a windows 10 machine using MSYS2 and self-extracting files. It worked!

Windows 11 is problem.

wrcad commented 1 year ago

Interesting to know that the package works on Win 10 But not 11. I don’t currently have Win 11 but will eventually buy a new machine for supporting Win 11.

You might be able to see which dll is the problem by giving a command like “ldd /path/to/xic.dll”. The normal installed location for xic.dll in in /usr/local/xictools/bin. The command will list all the dlls needed to run the program, and the path to the dll. If any are “not found” then the program can not run.

Regards, Steve

On May 24, 2023, at 2:45 AM, tanaka-yasumoto @.***> wrote:

I tried a windows 10 machine using MSYS2 and self-extracting files. It worked!

Windows 11 is problem.

— Reply to this email directly, view it on GitHub https://github.com/wrcad/xictools/issues/12#issuecomment-1560796611, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEZ4PVFOATDWECFCFDKDFALXHXKEVANCNFSM5L5GQ6LQ. You are receiving this because you commented.

tanaka-yasumoto commented 1 year ago

Thank you. I have one question. Which gcc should I use to compile the sources? The MSYS2 homepage introduces us pacman -S mingw-w64-ucrt-x86_64-gcc. Is it ok for mingw64 (MSVCRT) ? I cannot find out a "mingw-w64-msvcrt-x86_64-gcc" - like package.

or Can I use the following one found in https://www.msys2.org/ for a gcc compiler? pacman -S mingw-w64-ucrt-x86_64-gcc (with mingw_w64-x86_64-toolchain ?).

Which gcc compiler do you use?

-> I understand the mingw_w64-x86_64-toolchain includes gcc, c++ compiler. The mingw-w64-ucrt-x86_64-gcc should not be installed.

The make config vomitted 'there is no autoconf'. Is there a necessity to make an invocation "pacman -S mingw-w64-x86_64-autotools"? There might be several variants for autoconfig package.

wrcad commented 1 year ago

There are instruction for MSYS in the README file at the top of the source code tree. To get the compiler and accessories: pacman -S mingw_w64-x86_64-toolchain.

On May 25, 2023, at 7:04 AM, tanaka-yasumoto @.***> wrote:

Thank you. I have one question. Which gcc shoule I use to compile the sources? The MSYS2 homepage introduces us pacman -S mingw-w64-ucrt-x86_64-gcc. Is it ok for mingw64 (MSVCRT) ? I cannot find out a "mingw-w64-msvcrt-x86_64-gcc" - like package.

— Reply to this email directly, view it on GitHub https://github.com/wrcad/xictools/issues/12#issuecomment-1562969300, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEZ4PVE7ZLQJITYHZRE7XBDXH5RGPANCNFSM5L5GQ6LQ. You are receiving this because you commented.

wrcad commented 1 year ago

The README file from the devel branch is the one with useful info, probably the one in the master branch is too old.

On May 25, 2023, at 7:04 AM, tanaka-yasumoto @.***> wrote:

Thank you. I have one question. Which gcc shoule I use to compile the sources? The MSYS2 homepage introduces us pacman -S mingw-w64-ucrt-x86_64-gcc. Is it ok for mingw64 (MSVCRT) ? I cannot find out a "mingw-w64-msvcrt-x86_64-gcc" - like package.

— Reply to this email directly, view it on GitHub https://github.com/wrcad/xictools/issues/12#issuecomment-1562969300, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEZ4PVE7ZLQJITYHZRE7XBDXH5RGPANCNFSM5L5GQ6LQ. You are receiving this because you commented.

tanaka-yasumoto commented 1 year ago

I have read the README several times. Still my understanding might not be sufficient. Anyway, Thank you so much for your advices