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

A few problems to notice when installing #60

Open
iscas-zac opened this issue Apr 3, 2023 · 9 comments
Open

A few problems to notice when installing #60

iscas-zac opened this issue Apr 3, 2023 · 9 comments

Comments

@iscas-zac
Copy link

Recently I decided to play with Word-As-Image, which depends on diffvg project. I pulled the repo and tried to follow the python setup.py install instruction, but encounters a few problems. I list them below, for developers to consult with.

  1. NoneType error as in Not installing on Windows 8.1 #57. This error comes from the undefined LIBDIR config variable. I'm using a Miniconda3 / python 3.8 environment, and not sure if the absence of it is abnormal, but I found another variable called LIBDEST, and replaced the former one.
  2. cmake fail with

subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1.

I located the error in subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp) in setup.py, but first assumed that this is caused by not using CUDA. I rewrote some lines in setup.py, in vain. Then I assumed some cmake config error and looked at the cmake prompts, no use. The final solution lies in the error message

(path\to)\diffvg\diffvg.h(97,15): error C2169: 'log2': intrinsic function, cannot be defined [(path\to)\diffvg\build\temp.win-amd64-cpython-38\Release\diffvg.vcxproj]

and I commented out the inline double log2(double x) { .. } function in diffvg.h. It works.
3. diffvg import error. I found some reference to it here, and solved it with #12 (comment) .

@udiland
Copy link

udiland commented Apr 3, 2023

I also get the camke fail but couldnt solve it with the commenting out solution. (on linux)

@iscas-zac
Copy link
Author

I'll make a few remarks about my situation. I'm on Win11, with a poor AMD RX 640 graphics card, used Scoop to install Miniconda3, and noticed red error lines when processing the subprocess.check_call.

@iscas-zac
Copy link
Author

In your situation, I will first check if this problem arises from cmake --build . , and then go through the outputs for some red lines.

@udiland
Copy link

udiland commented Apr 3, 2023

Thanks! I have little experience doing this, but also like to plat with Words-As-Image..

@iscas-zac
Copy link
Author

Actually I also have little experience with neural networks. I'm now puzzled with training issues now. haha

@udiland
Copy link

udiland commented Apr 3, 2023

I meant with installing, configuring and such... :)
Good luck.

@hankunbo
Copy link

I also get the camke fail but couldnt solve it with the commenting out solution. (on linux)

same question

@udiland
Copy link

udiland commented Apr 13, 2023

I also get the camke fail but couldnt solve it with the commenting out solution. (on linux)

same question

You can try Install/update 'build-essential'

@kepurG
Copy link

kepurG commented Jul 14, 2024

I spent days and nights to complete the diffvg compilation on Windows. If anyone wants the wheels, you can contact me +V13862010554. Let's create a group to communicate and exchange about the improvements based on the module together.

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

4 participants