Hello Rainer,
You are probably right regarding OVH's limitations. I guess they'll
suggest a dedicated server at a monthly price I can't afford. ;-)
My motivation has been to take advantages of calling BP procedures via
PHP instructions. In this way, part of the input could be prepared in
advance — even using database storage — and the output could also be
processed in various ways. For instance, Csound orchestras, definitions
of sound-object prototypes etc., anything that contains more information
that we can handle on a single line could be maintained in database
tables. I admit that this motivation has been naively prompted by my
current activity with databases and web.
So, having little hope that OVH grants me superuser's rights on a shared
hosting, I tried something else and it "almost" worked: using MAMP Pro
on my personal computer.
After activating gcc I was able to compile an run a tiny program that
says "Hello". Then I compiled BP using the Makefile, and it did compile,
yielding "bp" or 875 Kb announced as "Unix executable file". It did not
work when called from PHP:
<?php
$cmd = "./bp -v";
exec($cmd,$o);
print_r($o);
?>
"bp32" also did not run. However both run fine when called via Terminal.
This means that I have come as far as compiling a correct version of BP
under PHP on a MAMP server. Going beyond this step probably requires
working on MAMP setup - still a bit obscure to me. I'll manage it; :-)
It is an extremely pleasant surprise that this C code is really
cross-platform. This is probably the effect of systematic programming
when migrating BP through upgrades of MacOS. A major migration (which
had taken me several months full time) was the one from 68K to PPC circa
1994. This forced me to clean-up many dependencies, unknowingly
preparing the code for later upgrades, among which Anthony's migration
to MacOS X which was also a big issue.
It's wonderful to hear that exec time is much smaller via command-line
calls, even though large amounts of RAM may still be hired for storing
items. This indicates that the strategy of minimizing memory usage that
was so critical in the 1990s now pays off again. This is an advantage of
poverty ;-)
I agree with the suggestion that building a standalone application BP4
with its proper GUI should take full advantage of BP3's command-line
features. This is a reason why I am looking for some way of storing
large pieces of data. Once it works with a MySQL file it will be easy to
translate the process to the standalone app. My understanding is that
the GUI would be similar to the body of a car with a unique engine.
Bernard
Rainer Schütz wrote on 06/07/2020 16:25:
>> I tried both your and Anthony's suggestions without success… I should definitely wait for the reply of OVH support!
> Yea, I am not trying to push you, just make suggestions that might help.
>
>> Running “apt” without sudo yields the reply (my translation):
>>
>> E: Directory /var/cache/apt/archives/partial does not exist. - Acquire (13: Permission not granted)
>> E: Impossible to open the lock file /var/lib/dpkg/lock - open (13: Permission not granted)
>> E: Impossible to lock the admin directory (/var/lib/dpkg/). Do you have superuser's rights?
> Yea, I strongly suspect your account is not a full virtual server, but just a shared server. In that case they cannot give you root rights because you could take down the entire server including the 100 other accounts you share with;-). Their wording is ambivalent when it comes to describing a users capabilities with the account they provide.
>
>> For Anthony : echo $PATH returned expectedly:
>> /usr/local/php7.3/bin:/usr/local/bin:/usr/bin:/bin
>>
>> After all, I don't need superuser's rights. OVH folks should simply activate gcc and I would be able to run it!
> Build systems often require many dependencies, allowing gcc and not allowing apt access is rarely useful. They probably don’t offer that option. Gcc can also eat up a lot of system resources, another reason web-providers might not want to offer the option. And if they’d “just unlock” gcc, it would be in system-space, which would require root anyways.
>
>> From a few (old) forum entries I see that "gcc" is the C compiler in OVH.
>>
>> I finally tried to upload and untar Anthony's compiled "bp". But running "bp" claims that "there is no such file" whereas trying to run "bp32" or "bp64" tells that "this binary file cannot be executed". Still, Unix rights are identical as shown below:
>>
>> -rwxr-xr-x+ 1 letivbvp users 841072 juil. 5 04:34 bp
>> ...
>> -rwxr-xr-x+ 1 letivbvp users 997260 juil. 26 2019 bp32
>> -rwxr-xr-x+ 1 letivbvp users 964200 juil. 26 2019 bp64
> It’s not a user rights issue, Anthony’s bp32/bp64 only run on MacOS, I think. I am not aware of a file “bp” he provided. But if he sent you a linux-compiled file it is likely from his Ubuntu18.04 server, which might be incompatible with your Debian Jessie environment. You could try the binary I sentyesterday, the one specifically for Debian Jessie (I can send it to your private email, if you can’t find it). But I don’t understand, why it doesn’t see the file at all...
>
>> ...
>> let...@ss... (php/7.3/production/stable) ~/www/bolprocessor $ ./bp-ovh_ssh: ./bp: No file or directory of this type
>> let...@ss... (php/7.3/production/stable) ~/www/bolprocessor $ ./bp32
>> -ovh_ssh: ./bp32: cannot execute binary file: Format error for exec()
>> let...@ss... (php/7.3/production/stable) ~/www/bolprocessor $ ./bp64
>> -ovh_ssh: ./bp64: cannot execute binary file: Format error for exec()
> Sorry, no joy so far;-) But as you said, it’s always the first steps that are the most thorny and frustrating. Once you have a working workflow, things will be smooth. After all Anthony’s ports based on your code are impressively widely applicable;-)
>
> Best
> .r.
>
> PS: I am not sure, why you want to do your stuff on a webserver. Are you ultimately after a website on which bolprocessor can be run, or is it just because it seems to be easy to use this kind of quasi-cloud to run your builds. Because I doubt web-providers actively support this use-case, it could be pretty demanding on the server…
>
> _______________________________________________
> bolprocessor-devel mailing list
> bol...@li...
> https://lists.sourceforge.net/lists/listinfo/bolprocessor-devel
|