[tlbuild] asy2.48
Henri Menke
henrimenke at gmail.com
Thu Mar 28 21:42:35 CET 2019
On 28/03/19 1:16 PM, Norbert Preining wrote:
> Hi John, hi all,
>
> it seems that the current asy is seriously broken ...
>
> On Thu, 28 Mar 2019, Johannes Hielscher wrote:
>> Yes, same here on aarch64-linux (Debian Stretch). I had to hand in the
>> libglm-dev package, but just to find this later on:
> ..
>> So I needed to change the "CXXFLAGS=-ansi" to
>> "CXXFLAGS=-std=c++11" (from the “Special considerations for asymptote”
>
> Here on Debian/jessie, which I used for building all the other TL stuff
> and where c++11 *should* be supported, the same situation:
> - first I need to install libglm-dev on top of the rest of GL libs.
> - then adding CXXFLAGS=-std=c++11
I can compile the Asymptote bundled with TeX Live in a Debian Jessie Docker
container using the following packages:
autoconf build-essential freeglut3-dev libglew-dev libfftw3-dev libreadline-dev libgsl0-dev
Some of these might not be needed in general but I wanted to test the maximum
configuration. This patch is needed to make it compile on GCC 4.9. The former
hunk with the using glm::value_ptr is probably a compiler bug which is fixed in
newer versions. The latter hunk with {{}} is actually required by C++11 and
the old code was wrong but more recent compilers are more relaxed about brace
initialization.
-----------------------------------------
diff --git a/utils/asymptote/glrender.cc b/utils/asymptote/glrender.cc
index ab5f13836..54938dc94 100644
--- a/utils/asymptote/glrender.cc
+++ b/utils/asymptote/glrender.cc
@@ -1669,6 +1669,7 @@ void setUniforms(GLint shader)
glUseProgram(shader);
+ using glm::value_ptr;
glUniformMatrix4fv(glGetUniformLocation(shader,"projViewMat"),1,GL_FALSE, value_ptr(gl::projViewMat));
glUniformMatrix4fv(glGetUniformLocation(shader,"viewMat"),1,GL_FALSE, value_ptr(gl::viewMat));
glUniformMatrix4fv(glGetUniformLocation(shader,"normMat"),1,GL_FALSE, value_ptr(gl::normMat));
diff --git a/utils/asymptote/shaders.h b/utils/asymptote/shaders.h
index 1151de667..ee5a6f005 100644
--- a/utils/asymptote/shaders.h
+++ b/utils/asymptote/shaders.h
@@ -21,5 +21,5 @@
GLuint createShaders(GLchar const *src, int shaderType);
GLuint createShaderFile(std::string file, int shaderType, size_t Nlights,
size_t Nmaterials,
- std::unordered_set<std::string> compilerFlags={});
+ std::unordered_set<std::string> compilerFlags={{}});
#endif
-----------------------------------------
Then I configure and make
./configure
CXXFLAGS=-std=c++11 make
There are a lot of deprecation messages from GLM in the log, but I have no idea
whether they influence the behaviour.
>
> But in my case on jessie it still does not build:
> glrender.cc: In function 'void gl::initshader()':
> glrender.cc:1334:41: error: converting to 'std::unordered_set<std::basic_string<char> >' from initializer list would use explicit constructor 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Value = std::basic_string<char>; _Hash = std::hash<std::basic_string<char> >; _Pred = std::equal_to<std::basic_string<char> >; _Alloc = std::allocator<std::basic_string<char> >; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::hasher = std::hash<std::basic_string<char> >; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<std::basic_string<char> >; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::basic_string<char> >]'
> Nmaterials);
> ^
>
> and many many many others.
>
>
> Even with
> --disable-gl
> I still get
> drawpath3.cc:11:23: fatal error: glm/glm.hpp: No such file or directory
> #include <glm/glm.hpp>
> ^
>
> So I cannot build at all.
>
> John, could you please look into this mess and suggest a solution?
>
> Best
>
> Norbert
>
> --
> PREINING Norbert http://www.preining.info
> Accelia Inc. + JAIST + TeX Live + Debian Developer
> GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
>
More information about the tlbuild
mailing list