Electric potential - different definitions

The english wikipedia page defines the electic potential in the following way:

The electric potential at a point r in a static electric field E is given by the line integral

$V_\mathbf{E} = - \int_C \mathbf{E} \cdot \mathrm{d} \boldsymbol{\ell}$

where $C$ is an arbitrary path connecting the point with zero potential to $r$.

So if we take infinity to be a point with zero potential, the path we take is from the infinity to that point.

However the other definition I know states that the electric potential at a given point is equal to the work that needs to be done to move charge $q$ from that point to infinity, divided by $q$.

It seems to me that the definitions are not equivalent (both give the same result, but with opposite sign). Could anyone clarify this for me please?

The electric potential at a point is minus the work done by the electric field in taking unit positive charge from infinity to the point.

That is your first definition

$V_\mathbf{E} = - \int_C \mathbf{E} \cdot \mathrm{d} \boldsymbol{\ell}$

$\mathbf{E}$ is the force on unit positive charge in an electric field $\mathbf{E}$.

$\mathbf{E} \cdot \mathrm{d} \boldsymbol{\ell}$ is the work done by the electric field when undergoing a displacement $\mathrm{d} \boldsymbol{\ell}$

$\int_C \mathbf{E} \cdot \mathrm{d} \boldsymbol{\ell}$ is the work done by the electric field in moving unit positive charge from infinity to the point.

Negating the work done gives you the electric potential at a point.

Your second definition lack some important detail.
It is the work done by the electric field.

Given that the electric potential at a point is minus the work done by the electric field in taking unit positive charge from infinity to the point if one reverses the limits of integration i.e. goes from the point to infinity one changes the sign of the integral i.e. it is plus the work done by the electric field in taking unit positive charge from the point to infinity.

The other definition which is often used is that the potential at a point is the work done by an external force in taking unit positive charge from infinity to the point.

Consider first your definition and a path from point A to $\infty$; using the definition of work as the integral of force times the change in position: $$V = \frac{\left. \mathcal{L}\right |_{A\infty}}{q} = \frac{1}{q} \int_A^{\infty} F\ dS$$ with $V$ potential, $\mathcal{L}$ work, $q$ charge you are moving, $F$ force and $dS$ infinitesimal change in position.

Now, the Wikipedia page says that the potential is minus the integral on the path from $\infty$ to A divided by $q$; this means you have put a minus sign outside the integral and you have exchanged the starting and the final point of your integration. $$V = - \frac{1}{q} \int_{\infty}^A F\ dS$$ From mathematics, these two integrals are identical: $$\frac{1}{q} \int_A^{\infty} F\ dS = - \frac{1}{q} \int_{\infty}^A F\ dS$$ Therefore, both definition are correct.