[erlang-bugs] R15B01 'make install_docs' failure "escript: exception error: undefined function xmerl:export_simple/2"

Lukas Larsson lukas@REDACTED
Tue Jun 19 16:24:35 CEST 2012


Hi,

Place them right after the "main(Args) ->" line and it should work.

I see nothing wrong with the output you pasted below.

Lukas

On 19/06/12 16:16, Barry Hawkins wrote:
> Lukas,
> Hello, and thanks for your response. Placing those two lines just 
> after the comment blocks and just before the "main(Args) ->" line, but 
> it results in a syntax error:
>
> otp_src_R15B01 barryh$ make install-docs
> ERL_TOP=/Users/barryh/otp_src_R15B01 
> INSTALLROOT=/Users/barryh/lib/erlang 
> PATH=/Users/barryh/otp_src_R15B01/bootstrap/bin:${PATH} \
> make RELEASE_ROOT=/Users/barryh/lib/erlang release_docs
> PATH=/Users/barryh/otp_src_R15B01/bin:${PATH} escript 
> /Users/barryh/otp_src_R15B01/lib/erl_docgen/priv/bin/xref_mod_app.escript 
> -topdir /Users/barryh/otp_src_R15B01 -outfile 
> /Users/barryh/otp_src_R15B01/make/i386-apple-darwin11.4.0/mod2app.xml
> /Users/barryh/otp_src_R15B01/lib/erl_docgen/priv/bin/xref_mod_app.escript:42: 
> syntax error before: ':'
> escript: There were compilation errors.
> make[1]: *** [mod2app] Error 127
> make: *** [install-docs] Error 2
>
> Being new to Erlang, there may be some context I'm missing. Is there a 
> particular function in which I need to embed those directives? In the 
> meantime I have executed those two directives in the shell in the 
> event that would be partially helpful:
>
> $ erl
> Erlang R15B01 (erts-5.9.1) [source] [smp:8:8] [async-threads:0] [hipe] 
> [kernel-poll:false]
>
> Eshell V5.9.1  (abort with ^G)
> 1> erlang:display({rootdir,code:root_dir()}).
> {rootdir,"/Users/barryh/lib/erlang"}
> true
> 2> erlang:display({paths,code:get_path()}).
> {paths,[".","/Users/barryh/lib/erlang/lib/kernel-2.15.1/ebin","/Users/barryh/lib/erlang/lib/stdlib-1.18.1/ebin","/Users/barryh/lib/erlang/lib/xmerl-1.3.1/ebin","/Users/barryh/lib/erlang/lib/wx-0.99.2/ebin","/Users/barryh/lib/erlang/lib/webtool-0.8.9.1/ebin","/Users/barryh/lib/erlang/lib/typer-0.9.3/ebin","/Users/barryh/lib/erlang/lib/tv-2.1.4.9/ebin","/Users/barryh/lib/erlang/lib/tools-2.6.7/ebin","/Users/barryh/lib/erlang/lib/toolbar-1.4.2.2/ebin","/Users/barryh/lib/erlang/lib/test_server-3.5.1/ebin","/Users/barryh/lib/erlang/lib/syntax_tools-1.6.8/ebin","/Users/barryh/lib/erlang/lib/ssl-5.0.1/ebin","/Users/barryh/lib/erlang/lib/ssh-2.1/ebin","/Users/barryh/lib/erlang/lib/snmp-4.22/ebin","/Users/barryh/lib/erlang/lib/sasl-2.2.1/ebin","/Users/barryh/lib/erlang/lib/runtime_tools-1.8.8/ebin","/Users/barryh/lib/erlang/lib/reltool-0.6/ebin","/Users/barryh/lib/erlang/lib/public_key-0.15/ebin","/Users/barryh/lib/erlang/lib/pman-2.7.1.2/ebin","/Users/barryh/lib/erlang/lib/percept-0.8.6.1/ebin","/Users/barryh/lib/erlang/lib/parsetools-2.0.7/ebin","/Users/barryh/lib/erlang/lib/otp_mibs-1.0.7/ebin","/Users/barryh/lib/erlang/lib/os_mon-2.2.9/ebin","/Users/barryh/lib/erlang/lib/orber-3.6.24/ebin","/Users/barryh/lib/erlang/lib/odbc-2.10.12/ebin","/Users/barryh/lib/erlang/lib/observer-1.1/ebin","/Users/barryh/lib/erlang/lib/mnesia-4.7/ebin","/Users/barryh/lib/erlang/lib/megaco-3.16.0.1/ebin","/Users/barryh/lib/erlang/lib/jinterface-1.5.6","/Users/barryh/lib/erlang/lib/inviso-0.6.3/ebin","/Users/barryh/lib/erlang/lib/inets-5.9/ebin","/Users/barryh/lib/erlang/lib/ic-4.2.30/ebin","/Users/barryh/lib/erlang/lib/hipe-3.9.1/ebin","/Users/barryh/lib/erlang/lib/gs-1.5.15.1/ebin","/Users/barryh/lib/erlang/lib/eunit-2.2.2/ebin","/Users/barryh/lib/erlang/lib/et-1.4.4.1/ebin","/Users/barryh/lib/erlang/lib/erts-5.9.1/ebin","/Users/barryh/lib/erlang/lib/erl_interface-3.7.7","/Users/barryh/lib/erlang/lib/erl_docgen-0.3.1/ebin","/Users/barryh/lib/erlang/lib/eldap-1.0/ebin","/Users/barryh/lib/erlang/lib/edoc-0.7.9.1/ebin","/Users/barryh/lib/erlang/lib/diameter-1.1/ebin","/Users/barryh/lib/erlang/lib/dialyzer-2.5.1/ebin","/Users/barryh/lib/erlang/lib/debugger-3.2.8/ebin","/Users/barryh/lib/erlang/lib/crypto-2.1/ebin","/Users/barryh/lib/erlang/lib/cosTransactions-1.2.12/ebin","/Users/barryh/lib/erlang/lib/cosTime-1.1.12/ebin","/Users/barryh/lib/erlang/lib/cosProperty-1.1.15/ebin","/Users/barryh/lib/erlang/lib/cosNotification-1.1.18/ebin","/Users/barryh/lib/erlang/lib/cosFileTransfer-1.1.13/ebin","/Users/barryh/lib/erlang/lib/cosEventDomain-1.1.12/ebin","/Users/barryh/lib/erlang/lib/cosEvent-2.1.12/ebin","/Users/barryh/lib/erlang/lib/compiler-4.8.1/ebin","/Users/barryh/lib/erlang/lib/common_test-1.6.1/ebin","/Users/barryh/lib/erlang/lib/asn1-1.7/ebin","/Users/barryh/lib/erlang/lib/appmon-2.1.14.1/ebin"]}
> true
>
> Regards,
> -- 
> Barry
>
> On Mon, Jun 18, 2012 at 6:24 AM, Lukas Larsson <lukas@REDACTED 
> <mailto:lukas@REDACTED>> wrote:
>
>     Hello,
>
>     Unfortunately I cannot reproduce your error. Could you try to
>     insert this into the beginning
>     /Users/barryh/otp_src_R15B01/lib/erl_docgen/priv/bin/xref_mod_app.escript
>     and report back with your findings?
>
>     erlang:display({rootdir,code:root_dir()}),
>     erlang:display({paths,code:get_path()}),
>
>     Lukas
>
>
>     On 15/06/12 16:52, Barry Hawkins wrote:
>>     Summary: A local build and install from source for Erlang R15B01
>>     succeeds, 'make docs' succeeds, but the subsequent 'make
>>     install-docs' fails.
>>     Release: R15B01
>>     Operating System: Mac OS X Lion 10.7.4
>>
>>     Steps to Reproduce:
>>     $ curl -O http://www.erlang.org/download/otp_src_R15B01.tar.gz
>>     $ tar xzvf otp_src_R15B01.tar.gz
>>     $ cd otp_src_R15B01
>>
>>     Per instructions at
>>     http://www.erlang.org/doc/installation_guide/INSTALL.html#Building-a-fast-Erlang-VM-on-Mac-OS-Lion
>>     install MacPorts GCC 4.5.
>>
>>     $ sudo port install gcc45 +universal
>>
>>     Install wxWidgets 2.8.12 and FOP 1.0 from MacPorts to satisfy
>>     dependencies.
>>
>>     $ sudo port install wxwidgets
>>     $ which wx-config
>>     /opt/local/bin/wx-config
>>
>>     $ sudo port install fop
>>     $ which fop
>>     /opt/local/bin/fop
>>
>>     otp_src_R15B01 barryh$ PATH=/usr/local/bin:$PATH
>>     CC=/opt/local/bin/gcc-mp-4.5 CXX=/opt/local/bin/g++-mp-4.5
>>     ./configure --enable-m32-build --prefix=$HOME
>>     otp_src_R15B01 barryh$ make install
>>     otp_src_R15B01 barryh$ which erl
>>     /Users/barryh/bin/erl
>>
>>     With a successful installation of the system, proceeding to
>>     install the documentation per instructions at
>>     http://www.erlang.org/doc/installation_guide/INSTALL.html#The-ErlangOTP-Documentation_How-to-Build-the-Documentation
>>
>>     otp_src_R15B01 barryh$ export PATH=$HOME/lib/erlang/bin:$PATH
>>     otp_src_R15B01 barryh$ echo $PATH
>>     /Users/barryh/lib/erlang/bin:/Users/barryh/bin:/opt/local/bin:/opt/local/sbin:/Users/barryh/play-2.0.1:/Users/barryh/scala/bin:/Library/Frameworks/Python.framework/Versions/3.2/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
>>     otp_src_R15B01 barryh$ export FOP_OPTS="-Xmx8192m"
>>     otp_src_R15B01 barryh$ make docs
>>     otp_src_R15B01 barryh$ make install-docs
>>     ERL_TOP=/Users/barryh/otp_src_R15B01
>>     INSTALLROOT=/Users/barryh/lib/erlang
>>     PATH=/Users/barryh/otp_src_R15B01/bootstrap/bin:${PATH} \
>>     make RELEASE_ROOT=/Users/barryh/lib/erlang release_docs
>>     PATH=/Users/barryh/otp_src_R15B01/bin:${PATH} escript
>>     /Users/barryh/otp_src_R15B01/lib/erl_docgen/priv/bin/xref_mod_app.escript
>>     -topdir /Users/barryh/otp_src_R15B01 -outfile
>>     /Users/barryh/otp_src_R15B01/make/i386-apple-darwin11.4.0/mod2app.xml
>>     escript: exception error: undefined function xmerl:export_simple/2
>>       in function  erl_eval:do_apply/6 (erl_eval.erl, line 572)
>>       in call from erl_eval:expr/5 (erl_eval.erl, line 367)
>>       in call from erl_eval:exprs/5 (erl_eval.erl, line 118)
>>       in call from erl_eval:local_func/5 (erl_eval.erl, line 470)
>>       in call from escript:interpret/4 (escript.erl, line 754)
>>       in call from escript:start/1 (escript.erl, line 277)
>>       in call from init:start_it/1
>>     make[1]: *** [mod2app] Error 127
>>     make: *** [install-docs] Error 2
>>
>>     Comments:
>>     After some searching, it seems a similar issue has been
>>     encountered before. In particular, there were some reports
>>     following the release of R14B02 in March 2011, with commentary
>>     confirming the behavior on Ubuntu, CentOS, and Mac OS X. Here are
>>     links to the start of the related threads, one in
>>     erlang-questions and the other in erlang-bugs:
>>
>>     http://erlang.org/pipermail/erlang-questions/2011-March/057024.html
>>     http://erlang.org/pipermail/erlang-bugs/2011-March/002247.html
>>
>>     I confirmed the presence of xmerl-X.X.X in the installation's lib
>>     directory:
>>
>>     $ ls -Fla /Users/barryh/lib/erlang/lib/xmerl-1.3.1/
>>     total 0
>>     drwxr-xr-x   5 barryh  staff   170 Jun 14 13:18 ./
>>     drwxr-xr-x  58 barryh  staff  1972 Jun 14 13:18 ../
>>     drwxr-xr-x  37 barryh  staff  1258 Jun 14 13:18 ebin/
>>     drwxr-xr-x   5 barryh  staff   170 Jun 14 13:18 include/
>>     drwxr-xr-x  42 barryh  staff  1428 Jun 14 13:18 src/
>>
>>     I also confirmed that the xmerl module could be loaded in my
>>     shell using a small example from
>>     http://stackoverflow.com/questions/1227241/building-an-xmerl-document-in-erlang.
>>
>>     > Data = {myNode,[{foo,"Foo"},{bar,"Bar"}], []}.
>>     {myNode,[{foo,"Foo"},{bar,"Bar"}],[]}
>>     > lists:flatten(xmerl:export_simple([Data], xmerl_xml)).
>>     "<?xml version=\"1.0\"?><myNode foo=\"Foo\" bar=\"Bar\"/>"
>>     > m().
>>     Module                File
>>     application          
>>     /Users/barryh/lib/erlang/lib/kernel-2.15.1/ebin/application.beam
>>     ...
>>     xmerl                
>>     /Users/barryh/lib/erlang/lib/xmerl-1.3.1/ebin/xmerl.beam
>>     xmerl_lib            
>>     /Users/barryh/lib/erlang/lib/xmerl-1.3.1/ebin/xmerl_lib.beam
>>     xmerl_xml            
>>     /Users/barryh/lib/erlang/lib/xmerl-1.3.1/ebin/xmerl_xml.beam
>>     ...
>>
>>     I tried changing "#!/usr/bin/env escript" to
>>     "#!/Users/barryh/bin/escript" as mentioned in
>>     http://erlang.org/pipermail/erlang-questions/2011-March/057072.html,
>>     but the behavior remained the same.
>>
>>     I also tried adding the source's bin directory to $PATH instead
>>     of the installed system's bin directory, but the behavior did not
>>     change:
>>
>>     otp_src_R15B01 barryh$ export
>>     PATH=/Users/barryh/otp_src_R15B01/bin:$PATH
>>     otp_src_R15B01 barryh$ echo $PATH
>>     /Users/barryh/otp_src_R15B01/bin:/Users/barryh/bin:/opt/local/bin:/opt/local/sbin:/Users/barryh/play-2.0.1:/Users/barryh/scala/bin:/Library/Frameworks/Python.framework/Versions/3.2/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
>>     otp_src_R15B01 barryh$ make install-docs
>>     ERL_TOP=/Users/barryh/otp_src_R15B01
>>     INSTALLROOT=/Users/barryh/lib/erlang
>>     PATH=/Users/barryh/otp_src_R15B01/bootstrap/bin:${PATH} \
>>     make RELEASE_ROOT=/Users/barryh/lib/erlang release_docs
>>     PATH=/Users/barryh/otp_src_R15B01/bin:${PATH} escript
>>     /Users/barryh/otp_src_R15B01/lib/erl_docgen/priv/bin/xref_mod_app.escript
>>     -topdir /Users/barryh/otp_src_R15B01 -outfile
>>     /Users/barryh/otp_src_R15B01/make/i386-apple-darwin11.4.0/mod2app.xml
>>     escript: exception error: undefined function xmerl:export_simple/2
>>       in function  erl_eval:do_apply/6 (erl_eval.erl, line 572)
>>       in call from erl_eval:expr/5 (erl_eval.erl, line 367)
>>       in call from erl_eval:exprs/5 (erl_eval.erl, line 118)
>>       in call from erl_eval:local_func/5 (erl_eval.erl, line 470)
>>       in call from escript:interpret/4 (escript.erl, line 754)
>>       in call from escript:start/1 (escript.erl, line 277)
>>       in call from init:start_it/1
>>     make[1]: *** [mod2app] Error 127
>>     make: *** [install-docs] Error 2
>>
>>     Thanks in advance for any insight one may be able to provide, and
>>     apologies if I have overlooked some issue.
>>
>>     Regards,
>>     -- 
>>     Barry Hawkins
>>     twitter: @barryhawkins
>>     blog: http://barryhawkins.com/blog/
>>     linkedin: http://www.linkedin.com/in/barryhawkins
>>
>>
>>
>>     _______________________________________________
>>     erlang-bugs mailing list
>>     erlang-bugs@REDACTED  <mailto:erlang-bugs@REDACTED>
>>     http://erlang.org/mailman/listinfo/erlang-bugs
>
>     _______________________________________________
>     erlang-bugs mailing list
>     erlang-bugs@REDACTED <mailto:erlang-bugs@REDACTED>
>     http://erlang.org/mailman/listinfo/erlang-bugs
>
>
>
>
> -- 
> Barry Hawkins
> twitter: @barryhawkins
> blog: http://barryhawkins.com/blog/
> linkedin: http://www.linkedin.com/in/barryhawkins
>
>
>
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20120619/920577c1/attachment.htm>


More information about the erlang-bugs mailing list