Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help getting build working #131

Open
jackocnr opened this issue Apr 17, 2024 · 2 comments
Open

Help getting build working #131

jackocnr opened this issue Apr 17, 2024 · 2 comments

Comments

@jackocnr
Copy link

Thanks again for this fab project!

I'm trying to rebuild the data to submit a PR, but I'm struggling to get the build script working. I'm on MacOS v13.6.6 and so far I've managed the following:

Install the required version of PHP (7.3) - instructions here

Install Composer locally - instructions here

I've successfully installed the project dependencies with ./composer.phar install

But now I'm having trouble running the build script. The readme says to run docker-compose run php /var/www/html/bin/build -v but that doesn't seem right, as I don't have a docker-compose command, nor a /var/www/html/bin/build directory. I've tried just running php bin/build -v which seems to run a bit, but then produces the following errors:

PHP Warning:  The use statement with non-compound name 'Locale' has no effect in /Users/jack/workspace/country-list/bin/build on line 4

Warning: The use statement with non-compound name 'Locale' has no effect in /Users/jack/workspace/country-list/bin/build on line 4
[file+] /Users/jack/workspace/country-list/bin/../data/af/country.json
[file+] /Users/jack/workspace/country-list/bin/../data/af/country.xliff
[file+] /Users/jack/workspace/country-list/bin/../data/af/country.xml
[file+] /Users/jack/workspace/country-list/bin/../data/af/country.txt

In AbstractPostgreSQLDriver.php line 79:
                                                                                                                                                       
  [Doctrine\DBAL\Exception\DriverException]                                                                                                            
  An exception occurred in driver: SQLSTATE[08006] [7] could not translate host name "pgsql" to address: nodename nor servname provided, or not known  
                                                                                                                                                       

Exception trace:
  at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php:79
 Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:169
 Doctrine\DBAL\DBALException::wrapException() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:155
 Doctrine\DBAL\DBALException::driverException() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php:48
 Doctrine\DBAL\Driver\PDOPgSql\Driver->connect() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:356
 Doctrine\DBAL\Connection->connect() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:422
 Doctrine\DBAL\Connection->getDatabasePlatformVersion() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:382
 Doctrine\DBAL\Connection->detectDatabasePlatform() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:324
 Doctrine\DBAL\Connection->getDatabasePlatform() at /Users/jack/workspace/country-list/vendor/umpirsky/list-generator/src/Umpirsky/ListGenerator/Exporter/SqlExporter.php:85
 Umpirsky\ListGenerator\Exporter\SqlExporter->exportCreateTable() at /Users/jack/workspace/country-list/vendor/umpirsky/list-generator/src/Umpirsky/ListGenerator/Exporter/SqlExporter.php:23
 Umpirsky\ListGenerator\Exporter\SqlExporter->export() at /Users/jack/workspace/country-list/vendor/umpirsky/list-generator/src/Umpirsky/ListGenerator/Builder/Build.php:81
 Umpirsky\ListGenerator\Builder\Build->execute() at /Users/jack/workspace/country-list/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /Users/jack/workspace/country-list/vendor/symfony/console/Application.php:987
 Symfony\Component\Console\Application->doRunCommand() at /Users/jack/workspace/country-list/vendor/symfony/console/Application.php:255
 Symfony\Component\Console\Application->doRun() at /Users/jack/workspace/country-list/vendor/symfony/console/Application.php:148
 Symfony\Component\Console\Application->run() at /Users/jack/workspace/country-list/bin/build:25

In PDOConnection.php line 31:
                                                                                                                      
  [Doctrine\DBAL\Driver\PDOException (7)]                                                                             
  SQLSTATE[08006] [7] could not translate host name "pgsql" to address: nodename nor servname provided, or not known  
                                                                                                                      

Exception trace:
  at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31
 Doctrine\DBAL\Driver\PDOConnection->__construct() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php:24
 Doctrine\DBAL\Driver\PDOPgSql\Driver->connect() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:356
 Doctrine\DBAL\Connection->connect() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:422
 Doctrine\DBAL\Connection->getDatabasePlatformVersion() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:382
 Doctrine\DBAL\Connection->detectDatabasePlatform() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:324
 Doctrine\DBAL\Connection->getDatabasePlatform() at /Users/jack/workspace/country-list/vendor/umpirsky/list-generator/src/Umpirsky/ListGenerator/Exporter/SqlExporter.php:85
 Umpirsky\ListGenerator\Exporter\SqlExporter->exportCreateTable() at /Users/jack/workspace/country-list/vendor/umpirsky/list-generator/src/Umpirsky/ListGenerator/Exporter/SqlExporter.php:23
 Umpirsky\ListGenerator\Exporter\SqlExporter->export() at /Users/jack/workspace/country-list/vendor/umpirsky/list-generator/src/Umpirsky/ListGenerator/Builder/Build.php:81
 Umpirsky\ListGenerator\Builder\Build->execute() at /Users/jack/workspace/country-list/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /Users/jack/workspace/country-list/vendor/symfony/console/Application.php:987
 Symfony\Component\Console\Application->doRunCommand() at /Users/jack/workspace/country-list/vendor/symfony/console/Application.php:255
 Symfony\Component\Console\Application->doRun() at /Users/jack/workspace/country-list/vendor/symfony/console/Application.php:148
 Symfony\Component\Console\Application->run() at /Users/jack/workspace/country-list/bin/build:25

In PDOConnection.php line 27:
                                                                                                                      
  [PDOException (7)]                                                                                                  
  SQLSTATE[08006] [7] could not translate host name "pgsql" to address: nodename nor servname provided, or not known  
                                                                                                                      

Exception trace:
  at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27
 PDO->__construct() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27
 Doctrine\DBAL\Driver\PDOConnection->__construct() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php:24
 Doctrine\DBAL\Driver\PDOPgSql\Driver->connect() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:356
 Doctrine\DBAL\Connection->connect() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:422
 Doctrine\DBAL\Connection->getDatabasePlatformVersion() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:382
 Doctrine\DBAL\Connection->detectDatabasePlatform() at /Users/jack/workspace/country-list/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:324
 Doctrine\DBAL\Connection->getDatabasePlatform() at /Users/jack/workspace/country-list/vendor/umpirsky/list-generator/src/Umpirsky/ListGenerator/Exporter/SqlExporter.php:85
 Umpirsky\ListGenerator\Exporter\SqlExporter->exportCreateTable() at /Users/jack/workspace/country-list/vendor/umpirsky/list-generator/src/Umpirsky/ListGenerator/Exporter/SqlExporter.php:23
 Umpirsky\ListGenerator\Exporter\SqlExporter->export() at /Users/jack/workspace/country-list/vendor/umpirsky/list-generator/src/Umpirsky/ListGenerator/Builder/Build.php:81
 Umpirsky\ListGenerator\Builder\Build->execute() at /Users/jack/workspace/country-list/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /Users/jack/workspace/country-list/vendor/symfony/console/Application.php:987
 Symfony\Component\Console\Application->doRunCommand() at /Users/jack/workspace/country-list/vendor/symfony/console/Application.php:255
 Symfony\Component\Console\Application->doRun() at /Users/jack/workspace/country-list/vendor/symfony/console/Application.php:148
 Symfony\Component\Console\Application->run() at /Users/jack/workspace/country-list/bin/build:25

Is there something else I need to do to get this working? Thanks for your time.

@umpirsky
Copy link
Owner

I didn't run it for quite some time, I might try when I have time and update it a bit. Looks like for PostgreSQLDriver some additional setup is needed.

@anthony0030
Copy link

I got it running,

I don't have a docker-compose command

Do you have Docker Desktop installed?

nor a /var/www/html/bin/build directory

This is a path from inside the docker container.

Try

  ./composer.phar self-update --2.2 

here are the Docker files that I was able to make.
I can't upload the vendor files as they are too big. I can send them to you via wetransfer if you want.

@jackocnr I have some experience with Docker but very little with PHP.

After the rebuild, the output files were the same.

ac: "Ascension Island",
xk: "Kosovo",

These weren't added

From my little understanding of PHP it looks like the data is coming from here.

Ps I am running MacOS 14.4.1 (23E224)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants