I have been trying to run BaseX as a web application on my mac. After some difficulties I have gotten it to work. However there is one thing that I am still unsure about. Whenever I start the web server using ‘basexhttp’ I get the following message:
/usr/local/bin/basexhttp: line 11: cd: /usr/local/Cellar/basex/7.9/libexec/../basex: No such file or directory
However everything thereafter seems to work fine. So why do I get this message, or what does it mean? In my installation (which I got through the brew script) there is no ‘basex’ file/folder at the specified location (which would be in the ‘7.9’ folder). Should there be? Any help or advice would be much appreciated.
best Philip
This is what /usr/local/Cellar/basex looks like: ---- basex 7.9 bin changelog.txt INSTALL_RECEIPT.json libexec BaseX.jar bin lib webapp license.txt readme.txt ----
--------------------------------------------------- Philip Spaelti Kobe Shoin Women's University, Graduate school ---------------------------------------------------
Hi Philip,
Jens did the initial port to brew and currently maintaining it. I pass this forward to him.
Thanks Alex
On 12.10.2014, at 09:36, spaelti spaelti@mac.com wrote:
I have been trying to run BaseX as a web application on my mac. After some difficulties I have gotten it to work. However there is one thing that I am still unsure about. Whenever I start the web server using ‘basexhttp’ I get the following message:
/usr/local/bin/basexhttp: line 11: cd: /usr/local/Cellar/basex/7.9/libexec/../basex: No such file or directory
However everything thereafter seems to work fine. So why do I get this message, or what does it mean? In my installation (which I got through the brew script) there is no ‘basex’ file/folder at the specified location (which would be in the ‘7.9’ folder). Should there be? Any help or advice would be much appreciated.
best Philip
This is what /usr/local/Cellar/basex looks like:
basex 7.9 bin changelog.txt INSTALL_RECEIPT.json libexec BaseX.jar bin lib webapp license.txt readme.txt
Philip Spaelti Kobe Shoin Women's University, Graduate school
Hi all,
Jens did the initial port to brew and currently maintaining it.
Actually it's not been me, I just somewhat took over updating the version number [1].
Anyway, I was already looking into the issue.
The problem is rather an "upstream" issue, as the `basexhttp` script expects the BaseX folder to be named `basex`, but in homebrew it is renamed to the version number (here: `7.9`, also see the directory structure posted by the OP, I left the full quote below).
`basexhttp`, line 11 [2] already is in the basex directory, steps up one level in the filesystem to descend a `basex` folder again. I don't quite get what the reason is, my guessing is that while refactoring the run files [3] the directory structure was changed. Formerly, the core seems to be stored in `basex-core` (I don't remember that any more), and this line was necessary and reasonable. Furthermore, it is only used to pass some `$BXCORE/target/classes" parameter and the same lib folder already passed through `$BX`. 1 I see three possibilities to resolve the issue:
- Fix the BaseX run script and remove `$BXCORE` completely, if my guessing above is correct - Change the `$BXCORE` line so it can deal with the BaseX directory being named something else than `basex` - Modify the homebrew package file to keep an `basex` folder otherwise
I'd strongly propose either doing (1) or (2), as renaming the root directory is nothing to be unexpected and might also be an issue to other platforms and/or users.
Regards, Jens
[1]: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/basex.rb [2]: https://github.com/JensErat/basex/blob/master/basex-api/etc/basexhttp#L11 [3]: https://github.com/BaseXdb/basex/commit/79c23d4a7ca5516da7a17b5baf0b6efe8ac5...
Am 12.10.2014 um 09:55 schrieb Alexander Holupirek:> Hi Philip,
Jens did the initial port to brew and currently maintaining it. I pass this forward to him.
Thanks Alex
On 12.10.2014, at 09:36, spaelti spaelti@mac.com wrote:
I have been trying to run BaseX as a web application on my mac. After
some difficulties I have gotten it to work.
However there is one thing that I am still unsure about. Whenever I
start the web server using ‘basexhttp’ I get the following message:
/usr/local/bin/basexhttp: line 11: cd:
/usr/local/Cellar/basex/7.9/libexec/../basex: No such file or directory
However everything thereafter seems to work fine. So why do I get this message, or what does it mean? In my installation (which I got through the brew script) there is no
‘basex’ file/folder at the specified location (which would be in the ‘7.9’ folder). Should there be?
Any help or advice would be much appreciated.
best Philip
This is what /usr/local/Cellar/basex looks like:
basex 7.9 bin changelog.txt INSTALL_RECEIPT.json libexec BaseX.jar bin lib webapp license.txt readme.txt
Philip Spaelti Kobe Shoin Women's University, Graduate school
Hi all,
tl;dr: it is a bug in 7.9 it is fixed in 8.0; if it works, don't worry about the error message.
The long version:
On Sunday 12 October 2014 10:35:09 Jens Erat wrote:
`basexhttp`, line 11 [2] already is in the basex directory, steps up one level in the filesystem to descend a `basex` folder again. I don't quite get what the reason is, my guessing is that while refactoring the run files [3] the directory structure was changed. Formerly, the core seems to be stored in `basex-core` (I don't remember that any more), and this line was necessary and reasonable. Furthermore, it is only used to pass some `$BXCORE/target/classes" parameter and the same lib folder already passed through `$BX`.
The $BXCORE variable is actually necessary when the bash scripts are used during the development (the classes from basex-core/target/classes must be included in the class path). Christian can provide more information on this topic.
I see three possibilities to resolve the issue:
- Fix the BaseX run script and remove `$BXCORE` completely, if my
guessing above is correct
The variable should not be present in the scripts shipped with the official release packages . This is a bug in 7.9 and should be fixed in 8.0. Read below for technical details.
The script basex-dist/release.pl searches for lines with "../basex-core" and deletes them [1]. However in 7.9 the basexhttp script still contained "../basex" which is not matched by the release.pl. The problem is fixed with 79c23d4 but the it is only merged in master (63bad345) and not in stable (from which the 7.9 version is tagged).
</bx:internals>
I hope I managed to shed some light on this problem :)
Regards, Dimitar
[1] https://github.com/BaseXdb/basex-dist/blob/master/release.pl#L72
basex-talk@mailman.uni-konstanz.de