RE: liferaysass.dll : A dynamic link library initialization routine failed

Luke Palnau, modified 5 Years ago. New Member Posts: 12 Join Date: 5/2/17 Recent Posts
I'm migrating to a new Windows Server 2016 build server and running into gradlew build errors when it tries to compile the first portlet module in the Liferay CE 7.0.4 GA5 workspace. On the gradle "task" buildCSS, I see:
Using native Sass compiler
# BridJ: LoadLibrary error when loading C:\Users\WES-DA~3\AppData\Local\Temp\BridJExtractedLibraries3401615323110354692\liferaysass.dll : A dynamic link library (DLL) initialization routine failed
I think I am just missing an installation, version incompatibility, or path issues on the new server.  Here are some of the new build server installation details:
node v8.9.4, npm 5.6.0
Python 3.7.6, pip 20.0.1
openjdk version "1.8.0_212", OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b03), OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b03, mixed mode)
npm global packages (output from npm list -g --depth 0)+-- bower@1.8.8
+-- grunt@1.0.4
+-- grunt-cli@1.3.2
+-- gulp-cli@2.2.0
+-- karma-cli@2.0.0
+-- npm@5.6.0
+-- protractor@5.4.2
`-- windows-build-tools@5.2.2
I saw a similar error reported that was due to JDK 11, but since OpenJDK 1.8 is being used on the new build server.  I have also confirmed the path C:\Users\WES-DA~3\AppData\Local\Temp\BridJExtractedLibraries3401615323110354692\liferaysass.dll does not exist before or after the build. During the build the folder appears with the dll present, and when I make a copy of the dll (during the build) I can see the liferaysass.dll has a file version 1.0.0.0 and product version 0.9.0.0. I've been comparing the new build server to the old working MS server 2012 and the only differences seem to be the old server has python 2.7 on the system path, and it doesn't have the windows-build-tools global npm package installed either. Thanks for any advice.
-Luke
Luke Palnau, modified 5 Years ago. New Member Posts: 12 Join Date: 5/2/17 Recent Posts
Any advice?
thumbnail
Dominik Marks, modified 5 Years ago. Regular Member Posts: 149 Join Date: 8/29/12 Recent Posts
As far as I know there is a bug in the native sass compiler when running under Windows (probably 64-bit only?).You can change the sass compiler to use ruby instead. That can be done by adding "
sass.compiler.class.name=ruby
" to the gradle.properties file.More information can be found here: https://portal.liferay.dev/docs/7-0/reference/-/knowledge_base/r/css-builder-gradle-plugin
Luke Palnau, modified 5 Years ago. New Member Posts: 12 Join Date: 5/2/17 Recent Posts
Thanks Dominik, this is a great suggestion and works for me. I found a reported bug related to JDK 11, but had trouble finding any other reported bugs related bugs, if you know the link, please add for others that are unfortunate enough to run into this issue. Its possible the old build server was windows 32-bit and could build it without issue.
thumbnail
Dominik Marks, modified 5 Years ago. Regular Member Posts: 149 Join Date: 8/29/12 Recent Posts
Good that it is working for you Luke. I was able to find the issue with Java 11 here:  https://issues.liferay.com/browse/LPS-87211

​​​​​​​The other parts, that it was working on Windows 32-bit and is now no longer working on Windows 64-bit, is a personal observation. I don't know if there is a specific jira issue for that.