Как я компилирую Perl 5.10 с поддержкой потока под FreeBSD 7.1?

Как сказал Акашдип Сингх, порт 8080 используется для протоколов HTTP. Если вы хотите изменить порт, который слушает ваше приложение, вы можете добавить эти строки в конец файла index.js.

const port = 3000;
app.listen(port, () => console.log(`Listening in port ${port}...`));

Константный порт может быть любым, каким вы хотите.

5
задан brian d foy 7 May 2009 в 04:40
поделиться

2 ответа

Чтобы включить потоки Perl 5.10 во FreeBSD 7. * все, что вам нужно сделать, это применить следующий патч, используя патч . Затем вы можете собрать perl с -Dusethreads или ответить на вопросы файла Configure , чтобы включить многопоточность, и все готово. Я еще не проводил каких-либо значительных тестов или сравнений, но все отлично компилируется, включая библиотеки потоков, и все мои программы на Perl работают нормально.

--- hints/freebsd.sh 2008/10/20 04:59:30 1.1
+++ hints/freebsd.sh 2008/10/20 22:49:29
@@ -211,6 +211,14 @@
exit 1
;;

+ 7.*)
+ # 7.x doesn't install libc_r by default, and Configure
+ # would fail in the code following
+ #
+ # gethostbyaddr_r() appears to have been implemented in 6.x+
+ ldflags="-pthread $ldflags"
+ ;;
+
*)
if [ ! -r "$lc_r" ]; then
cat <<EOM >&4 

РЕДАКТИРОВАТЬ: я забыл свою ссылку; проверьте здесь для получения дополнительной информации: http://www.gossamer-threads.com/lists/perl/porters/232518?nohighlight=1#232518 .

4
ответ дан 14 December 2019 в 13:46
поделиться

Contrary to Spolsky who said "perl is pretty much forgotten"... perl is very much alive.

You have not indicated which version of FreeBSD you have installed... But assuming that you have installed a min of FreeBSD 7.1 then you failed to install the threads libraries or the thread libs are not in the library path.

NOTE that libc is a general 'c' library and that libc_r is the thread-safe version of that file. Some of the 2005 google results suggest that libc_r has been deprecated.

With that in mind it is likely that you are in the middle of a "revision collision". Sadly FreeBSD does not provide the thread safe version of perl natively, however, they do package perl 5.10 and several later revisions. I found this link to be useful:

http://www.nabble.com/How---where-to-get-a-Perl-that-has-threads--td22270858.html

you might also want to try installing the p5-fork library which is included with FreeBSD

http://www.nabble.com/How---where-to-get-a-Perl-that-has-threads--td22270858.html

2
ответ дан 14 December 2019 в 13:46
поделиться
Другие вопросы по тегам:

Похожие вопросы: