Wings 3D Development Forum

Full Version: Compiling from source, errors in wings.hrl
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I downloaded the wings-1.5.4 source from sourceforge. I've followed the instructions in BUILD.unix, replacing some of it with packages available in my systems repos, and have managed to reduce errors down to a last similar few (I hope). I'm using GNU/Linux Trisquel (fork of Ubuntu). Here is the make output:

Code:
(cd intl_tools; make)
make[1]: Entering directory `/tmp/wings-1.5.4/intl_tools'
make TYPE=opt common
make[2]: Entering directory `/tmp/wings-1.5.4/intl_tools'
make[2]: Nothing to be done for `common'.
make[2]: Leaving directory `/tmp/wings-1.5.4/intl_tools'
make[1]: Leaving directory `/tmp/wings-1.5.4/intl_tools'
(cd src; make)
make[1]: Entering directory `/tmp/wings-1.5.4/src'
make TYPE=opt common
make[2]: Entering directory `/tmp/wings-1.5.4/src'
erlc -Werror -I ../e3d +debug_info '-Dwings_version="1.5.4"' -pa ../intl_tools  -o../ebin wings.erl
wings.hrl:172: referring to built-in type queue as a remote type; please take out the module name
wings.hrl:189: referring to built-in type array as a remote type; please take out the module name
wings.hrl:190: referring to built-in type array as a remote type; please take out the module name
wings.hrl:191: referring to built-in type array as a remote type; please take out the module name
wings.hrl:193: referring to built-in type set as a remote type; please take out the module name
wings.hrl:194: referring to built-in type array as a remote type; please take out the module name
wings.hrl:196: referring to built-in type array as a remote type; please take out the module name
make[2]: *** [../ebin/wings.beam] Error 1
make[2]: Leaving directory `/tmp/wings-1.5.4/src'
make[1]: *** [opt] Error 2
make[1]: Leaving directory `/tmp/wings-1.5.4/src'
make: *** [all] Error 2

Here are the packages I installed:
erlang libsdl1.2-dev rebar erlang-esdl erlang-cl erlang-esdl-dev
I don't think I needed rebar, as I wasn't building any of the other dependencies from source, but wasn't sure.
I ran the command export ERL_LIBS=/usr/lib/erlang/lib

The only info I could gather from searching around is these issues might be to do with incompatibility between Erlang versions? Thanks for any help!
Which version of Erlang are you using?

I got this kind of message when I was building 1.5.3 using the Erlang R16B03 (erts-5.10.4). Then, I have to update my environment to use the Erlang/OTP 17 [erts-6.*].
For 1.5.4 you can use it too (the latest one is required for Wings3D >= v2.0). You can find the Ubuntu packages here.

Rebar is needed to build the cl module.
The BUILD.unix file for 1.5.4 states "Erlang/OTP R16B01". My packager manager provides version "1:16.b.3-dfsg-1ubuntu2" for the erlang package, which I assume equates to "R16B03" which you said caused the problem with 1.5.3.

Does the 1.5.4 build only work with R16B01, not with R16B03, and then it works with R17 again? Or is this a mistake in the 1.5.4 BUILD.unix file stating it works with R16B01?

I'd prefer to install from the Ubuntu repositories, but I can only find R18 not any R17, will this work? If not I'll use your link.

EDIT: I missed the "Erlang/OTP R16B01 or later" in BUILD.unix. So I suppose this is just an issue with R16B03.
I think we missed to update the instructions, BUILD.unix,
probably still says so for wings-2.0.3 while it requires erl-18.3.

I don't now if Erlang 18 will work with 1.5.4 there was type changes in that erlang release too.

The problems are really just warnings so if you remove "warnings is errors" flag
-Werror from the makefile's it should work fine anyway.
I tried installing erlang R18 from source, which I think I did successfully (although the tests recommended to run after compile wouldn't build) -- but I've got a whole different set of errors for trying Wings 2.0.3.

After seeing your post dgud I've reinstalled my repos packages to try 1.5.4 again, however I can't find any mention of "warning" or "Werror" in the MakeFile. Supposedly I can use the -Wno-error flag, but I have no idea where to put it.

EDIT: I found the line ERL_COMPILE_FLAGS += -Werror $(TYPE_FLAGS) +debug_info in intl_tools/Makefile and removed the -Werror flag. However it hasn't changed any of the make output.
I just tested 1.5.4 builds clean with 18.3 release, so an erlang 18.* should be used.

-Werror is located for instance in src/Makefile in line 135

export ERL_LIBS=/home/dgud/src

> ls $ERL_LIBS
cl esdl wings

You can have several dirs in your ERL_LIBS=/usr/lib/erlang/lib:/home/callmeclean/src
if wings code dir is located in /home/callmeclean/src
(note on windows the separator is ';' instead of ':')

wings-2.0 requires that itself is included in ERL_LIBS, it is much easier to find include files that way.

wings-2.0 requires wxWidgets packages and that erlang is compiled to use them.

You can test with:
>erl
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V7.3 (abort with ^G)
1> wx:demo().
ok
2>

should pop up a demo window or print an error message.
I've tried removing the -Werror you mentioned, but the errors are still present. I guess that means they are actual errors not just warnings? The only difference is the command before the errors is missing the -Werror that it had before: erlc -I ../e3d +debug_info '-Dwings_version="1.5.4"' -pa ../intl_tools -o../ebin wings.erl

I'll try with Erlang 18.3 tomorrow, I suppose I may as well do it with Wings 2.0.3. Thanks for all the info.

EDIT: I installed the Ubuntu Wily (64-bit) 18.3 deb from erlang-solutions and tested wxWidgets but got an error:
1> wx:demo().
Fatal Error: Mismatch between the program and library build versions detected.
The library used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.6),
and your program used 2.8 (no debug,Unicode,compiler with C++ ABI 1009,wx containers,compatible with 2.6).
Aborted

I'm not sure if this means that .deb wasn't compiled against wxWidgets or something else is going on. I tried building Wings 2.0.3 under this anyway and got these errors:
wings_text.erl:22: can't find include lib "wings/intl_tools/wings_chars.hrl"
wings_text.erl:105: undefined macro 'WINGS_CHARS_JP'
wings_text.erl:31: function char_ranges/1 undefined
wings_text.erl:45: function char_ranges/1 undefined
make[2]: *** [../ebin/wings_text.beam] Error 1
make[2]: Leaving directory `/home/finn/Documents/src/wings-2.0.3/src'
make[1]: *** [opt] Error 2
make[1]: Leaving directory `/home/finn/Documents/src/wings-2.0.3/src'
make: *** [all] Error 2